
tsup
A zero-config tool that bundles TypeScript libraries, built on esbuild. No longer maintained.
- Stars
- 11.3k
- Forks
- 275
- Licence
- MIT
- Language
- TypeScript
- Last update
- 5 days ago
- Type
- Dev tool
What it is
tsup takes TypeScript (and JavaScript) source files and packages them into ready-to-publish JavaScript output, using esbuild under the hood. It is aimed at people who write libraries and want a bundle without writing a complex build configuration. The README says it works with .js, .json, .mjs, .ts and .tsx files, and that CSS support is experimental. The project's README now warns that it is no longer actively maintained and recommends tsdown instead.
- Bundle a TypeScript library entry file into a dist folder
- Bundle several entry files in one command, such as an index and a CLI file
- Prepare a package for publishing to npm
Great for
- Developers who maintain a TypeScript library and want a simple build step
- Existing projects already using tsup that do not need new features
- People who want bundling with little or no configuration
Not ideal for
- New projects: the README says the project is no longer actively maintained and suggests tsdown instead
- Anyone needing ongoing bug fixes or new features, since maintenance has stopped
- Users who need CSS bundling as a stable feature, since the README labels it experimental
How to get it
- 1
Install with a package manager
You'll need: Node.js · npm, yarn or pnpm
Install locally with npm
npm i tsup -DInstall locally with yarn
yarn add tsup --devInstall locally with pnpm
pnpm add tsup -D - 2
Run it
- Install tsup as a dev dependency in your project folder
- Run tsup with your entry file, for example: tsup src/index.ts
- Check the dist folder for the output files
- 3
Get the most out of it
- Bundle multiple entry files in one run, such as src/index.ts and src/cli.ts, to get matching outputs
- Read the docs at tsup.egoist.dev for the full list of options
- Check the migration guide before starting a new project, since the README recommends tsdown
Downloads
Strengths
- Simple command-line use with little configuration, according to the README
- Built on esbuild, a fast bundler
- Installs as a normal project dependency via npm, yarn or pnpm
Trade-offs
- No longer actively maintained, per the README warning
- CSS support is experimental
- The README points to external docs for full configuration options
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| tsup (this) | 11.3k | Dev tool | beginner | 5 days ago | Developers who maintain a TypeScript library and want a simple build step |
| esbuild | 40.1k | Dev tool | intermediate | 3 months ago | Developers who want fast builds for JavaScript, TypeScript, or CSS projects |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.