Bundle a TypeScript npm package into distributable JavaScript with a single command and no config file.
Build multiple library entry points at once and output them to a dist folder ready for publishing.
Migrate an existing tsup-based project to the recommended replacement tool tsdown using the linked migration guide.
Project is no longer actively maintained, the author recommends migrating to tsdown.
tsup is a command-line tool for bundling TypeScript libraries into distributable JavaScript files. It is designed to require no configuration for typical use cases, making it quick to set up compared to tools that need extensive configuration files before they will run. The tool is powered by esbuild, a JavaScript bundler known for fast build times. You point tsup at one or more TypeScript source files and it outputs compiled JavaScript files into a dist folder. It supports common file types that Node.js handles natively, including .js.mjs, and .json, along with .ts and .tsx TypeScript files. CSS bundling is noted as experimental. Installing tsup is done via npm, yarn, or pnpm as a development dependency in your project. Once installed, you can run it directly from the command line or add it to the scripts section of your package.json. No separate configuration file is required for common scenarios, though configuration options are available for more specific setups. Basic usage is a single command: tsup src/index.ts. Multiple entry files can be provided at once, and each produces a corresponding output file in the dist directory. Full configuration options and documentation are available on the project website. The README includes a prominent warning: the project is no longer actively maintained. The author recommends switching to a tool called tsdown instead, and a migration guide is linked. This is worth noting if you are evaluating tsup for a new project. The project is MIT-licensed and accumulated over 11,000 GitHub stars during its active period.
← egoist on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.