Add tsdown#44
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the build system from TypeScript Compiler (tsc) to tsdown, modernizing the build toolchain and package configuration. The project now outputs ES modules and uses a more contemporary build tool based on rolldown.
- Replaces TypeScript Compiler (tsc) with tsdown for building
- Updates package.json to properly support ES modules with
"type": "module" - Changes output directory from
lib/todist/
Reviewed Changes
Copilot reviewed 3 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tsdown.config.ts | Adds configuration file for the tsdown build tool, specifying entry point and build options |
| tsconfig.json | Removes outDir option as build output is now managed by tsdown |
| package.json | Updates module system to ESM, changes build script from tsc to tsdown, updates output paths to dist/, adds tsdown dependency, and corrects repository URL format |
| package-lock.json | Adds tsdown and its dependencies (rolldown, babel plugins, oxc-project tools, etc.) |
| biome.json | Removes obsolete lib directory from file includes list |
| .gitignore | Changes ignored output directory from lib/ to dist/ |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "types": "./lib/index.d.ts", | ||
| "module": "./dist/index.js", | ||
| "exports": { | ||
| ".": "./dist/index.js", |
There was a problem hiding this comment.
The package exports both 'module' and 'main' fields pointing to the same file. With '"type": "module"', the 'main' field will be treated as an ES module. Consider adding a 'types' field in the exports map (e.g., '"types": "./dist/index.d.ts"') for better TypeScript integration, especially when using modern Node.js resolution.
| ".": "./dist/index.js", | |
| ".": { | |
| "import": "./dist/index.js", | |
| "require": "./dist/index.js", | |
| "types": "./dist/index.d.ts" | |
| }, |
No description provided.