Support opt out external package deps.
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 275
- PR merge metrics
- No merged PRs in 30d
Description
> By default tsup bundles all import-ed modules but dependencies and peerDependencies in your package.json are always excluded, you can also use --external flag to mark other packages or other special package.json's dependencies and peerDependencies as external.
My use case is build main.ts to main.mjs, then copy the main.mjs to container and distribute the single file.
I used to use swc then esbuild for this, I only need to maintain an external list.
I want to replace the pipeline to tsup (tsup gives better source map, single step, easier to config).
I hope tsup support optout external the package.json, support some flag to opt out default externals.
Contributor guide
Research direction
Start with the --external behavior described in the issue and compare how dependencies and peerDependencies from package.json are marked external. Done means a supported opt-out flag allows bundling those default externals while preserving explicit --external behavior; validate by bundling main.ts to main.mjs and checking the output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100