The simplest and fastest way to bundle your TypeScript libraries.
The simplest and fastest way to bundle your TypeScript libraries.
[!WARNING] This project is not actively maintained anymore. Please consider using tsdown instead. Read more in the migration guide.
Bundle your TypeScript library with no config, powered by esbuild.
Anything that's supported by Node.js natively, namely .js, .json, .mjs. And TypeScript .ts, .tsx. CSS support is experimental.
Install it locally in your project folder:
npm i tsup -D
# Or Yarn
yarn add tsup --dev
# Or pnpm
pnpm add tsup -DYou can also install it globally but it's not recommended.
tsup [...files]Files are written into ./dist.
You can bundle multiple files in one go:
tsup src/index.ts src/cli.tsThis will output dist/index.js and dist/cli.js.
For complete usages, please dive into the docs.
For all configuration options, please see the API docs.
Head over to the discussions to share your ideas.
MIT © EGOIST
Dependency Dashboard
dts build fails on TypeScript 6: baseUrl injected even when tsconfig declares none (TS5101 is now a hard error)
`dts` build: a worker that dies without posting a message leaves the build promise pending — tsup exits 0 having emitted no declarations
Add Support to Typescript V7
bug: resolve TypeScript 7 build breakage caused by tsup/rollup-plugin-dts incompatibility during d.ts generation
Bump esbuild to 0.28
bundle: false only includes entrypoint modules in output
Support TypeScript 6
DTS Build error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0.
Insonsistent handling of the "browser" field