tsup vs tsdown
tsup vs tsdown compared for 2026: tsup 9.0 (esbuild-based library bundler whose README now says it is not actively maintained) vs tsdown 0.23 (Rolldown-based successor). Includes build times we measured with and without declaration files, the TypeScript 7 failure in tsup's dts build, default differences that change your dist folder, migration traps and when to stay on tsup.
Quick Answer
tsup and tsdown do the same job: turn a TypeScript library into ESM and CommonJS files plus .d.ts declarations with almost no config. tsup is built on esbuild and Rollup; tsdown is built on Rolldown and Oxc and borrows tsup's option names and parts of its code. The tsup README now opens with a warning that the project is not actively maintained and points to tsdown, although tsup 9.0.0 shipped on 14 October 2026 with a Node.js 22.18 minimum. In our runs on 1 December 2026, tsdown 0.23.7 built a 600-module library to ESM and CJS in 500-597 ms against 1,127-1,287 ms for tsup 9.0.0, and with declaration files in 4.9-5.1 s against 7.1-7.4 s, or 2.3-2.4 s with isolatedDeclarations. With TypeScript 7.0.2 installed, tsup's --dts build failed outright while tsdown emitted declarations. The catch is migration: tsdown defaults to ESM only, cleans dist on every build, always splits shared code into chunks, and silently ignores tsup-era option names such as bundle: false. Use tsdown for new libraries and plan a migration for existing ones; stay on tsup only while you are pinned to TypeScript 6 and need its exact output.
Last updated December 1, 2026. Covers tsup 9.0.0 (14 October 2026) and tsdown 0.23.7 (6 November 2026); npm registry metadata and download counts, GitHub repository and release notes, tsup README and tsdown docs (migrate from tsup, FAQ, getting started, dts) read on 1 December 2026, plus install, build-time, TypeScript 7, defaults and migration runs we did that day.
| Feature | tsup | tsdown |
|---|---|---|
| Licence & Repository | MIT; egoist/tsup, ~11.4k stars, 400 open issues | MIT; rolldown/tsdown, ~4.4k stars, 41 open issues |
| Latest Release | 9.0.0 on 14 Oct 2026 (8.5.1 on 12 Nov 2025) | 0.23.7 on 6 Nov 2026 |
| Maintenance Status | README: not actively maintained, use tsdown | Active, pre-1.0 |
| Bundler / Transformer | esbuild 0.28 for JS; Rollup + rollup-plugin-dts for .d.ts | Rolldown 1.3 + Oxc; rolldown-plugin-dts 0.30 for .d.ts |
| Node.js Required to Build | ^22.18.0 || ^24.11.0 || >=26.0.0 (since 9.0.0) | ^22.18.0 || ^24.11.0 || >=26.0.0 |
| Our Run: Install (with typescript 7.0.2) | 48 packages, 55 MB | 28 packages, 60 MB |
| npm Weekly Downloads (23-29 Nov 2026) | 12,241,033 | 6,883,981 |
| Our Run: 3-File Library, ESM + CJS | 288-363 ms | 128-138 ms |
| Our Run: 600 Modules, ESM + CJS (JS only) | 1,127-1,287 ms | 500-597 ms |
| Our Run: 600 Modules + .d.ts (TypeScript 6.0.3) | 7,086-7,443 ms | 4,904-5,054 ms (isolatedDeclarations via Oxc: 2,339-2,441 ms) |
| Our Run: --dts with TypeScript 7.0.2 | Failed: needs the TypeScript compiler API | Worked (tsgo generator, with a deprecation warning for 7.0) |
| Our Run: 600-Module Output (unminified ESM / CJS) | 252,510 B / 281,869 B; .d.ts 209,307 B | 230,296 B / 250,538 B; .d.ts 197,119 B |
| Default Format & Extensions | CJS only; .js for CJS, .mjs for ESM in a CommonJS package | ESM only; .mjs / .cjs (in our package with no type field) |
| Cleans outDir by Default | ||
| When .d.ts Is Generated | Only with --dts / dts: true | Auto if package.json has types, or tsconfig has declaration: true |
| Code Splitting | ESM yes, CJS no by default; can be disabled | Always on, ESM and CJS |
| Plugin System | esbuild plugins (+ experimental tsup plugins) | Rolldown, Rollup and unplugin plugins |
| package.json exports / publint / attw | Not built in | exports: true, publint, attw built in |
| Other Built-ins | onSuccess, metafile, swc, legacyOutput, IIFE as .global.js | workspace, exe (Node SEA), css pipeline, devtools, hooks, import.meta.glob |
| tsup Option Names | Native | Removed in 0.23; silently ignored |
tsup
tsup is the zero-config TypeScript library bundler that most npm packages adopted between 2021 and 2025. Point it at an entry (tsup src/index.ts) and it bundles with esbuild, writes CommonJS by default, ESM with --format esm, and declaration files with --dts through a Rollup pass using rollup-plugin-dts and the TypeScript compiler API. Configuration lives in tsup.config.ts with options such as entry, format, dts, splitting, clean, external, noExternal, onSuccess and esbuildPlugins. Its README now begins with a warning: this project is not actively maintained anymore, please consider using tsdown, with a link to tsdown's migration guide. Releases have not stopped entirely. tsup 9.0.0, published on 14 October 2026, migrated its debug logging to obug, dropped Node.js versions below 22.18 (engines ^22.18.0 || ^24.11.0 || >=26.0.0), upgraded esbuild to 0.28 and chokidar, exposed the Plugin type and removed baseUrl handling in tsconfig. The previous release, 8.5.1, came out in November 2025. tsup is MIT licensed, has about 11.4k GitHub stars with 400 open issues, and still had 12.2 million npm downloads in the last week of November 2026, almost twice tsdown's count.
Pros
- Still the most installed of the two: 12,241,033 npm downloads in the week of 23-29 November 2026 against 6,883,981
- Predictable, long-documented output and options; years of examples cover most library setups
- Can turn code splitting off and emit esbuild metafiles, both unavailable in tsdown
- esbuild plugins and the swc option still work for projects that depend on them
- Works with TypeScript 6 for declaration files exactly as before; 9.0.0 is a small upgrade from 8.x
Cons
- README says it is not actively maintained and recommends tsdown; 400 open issues
- --dts failed with TypeScript 7.0.2 in our run, and installing the suggested @typescript/typescript6 package still failed with a TypeError
- About twice as slow as tsdown in our runs: 1,127-1,287 ms vs 500-597 ms for 600 modules, and 7.1-7.4 s vs 4.9-5.1 s with declarations
- CommonJS output has no code splitting, so shared modules are duplicated across CJS entries
- No built-in package.json exports generation, publint or attw checks
Best For
Existing libraries that build fine on TypeScript 6 and depend on esbuild plugins, disabled splitting or exact tsup output, as a holding position while you schedule the move to tsdown.
tsdown
tsdown is a library bundler from the Rolldown project that describes itself as the spiritual successor to tsup. It bundles with Rolldown, transforms TypeScript with Oxc, and generates declaration files through rolldown-plugin-dts, which uses the TypeScript compiler, the native tsgo compiler, or Oxc's isolated-declarations transform when your tsconfig enables isolatedDeclarations. The CLI and config look like tsup's (entry, format, dts, outDir, platform, target), with renamed options under namespaces such as deps.neverBundle and css.inject. It adds things tsup never had: workspace builds for monorepos, generation of the package.json exports field, publint and attw checks, Node.js single-executable output, Vite DevTools bundle analysis, lifecycle hooks and a full CSS pipeline. Version 0.23.0 (3 September 2026) removed the remaining tsup-compatible option names and changed the attw default profile to esm-only; 0.23.7 (6 November 2026) moved to rolldown-plugin-dts 0.30 and changed how dts.entry filters entries. tsdown is MIT licensed, depends on rolldown ~1.3.0 (1.3.4 was installed), needs Node.js ^22.18.0, ^24.11.0 or >=26.0.0 at build time, and has about 4.4k GitHub stars with 41 open issues. It is still pre-1.0, so minor versions can break config.
Pros
- About twice as fast as tsup in our runs: 500-597 ms vs 1,127-1,287 ms for a 600-module ESM + CJS build
- Declarations in 4.9-5.1 s with the TypeScript compiler and 2.3-2.4 s with isolatedDeclarations, against 7.1-7.4 s for tsup
- Works with TypeScript 7: it emitted declarations with typescript 7.0.2 where tsup failed
- Generates package.json exports, main, module and types for you with exports: true, and can run publint and attw
- Code splitting in both ESM and CJS, so shared modules are not duplicated
- Actively released: 0.23.1 to 0.23.7 between October and November 2026, 41 open issues
Cons
- Pre-1.0: 0.23.0 removed option names and changed defaults, and 0.23.7 changed dts.entry behaviour
- Old tsup option names are silently ignored: bundle: false and outExtension produced a normal bundle with no warning in our run
- Defaults differ from tsup (ESM only, clean on, dts auto-enabled), so a straight swap changes your dist folder
- Code splitting cannot be turned off, and there is no metafile, swc or legacyOutput option
- esbuild plugins do not carry over; you need Rolldown, Rollup or unplugin equivalents
Best For
New TypeScript libraries, monorepos that build many packages, projects moving to TypeScript 7 or isolatedDeclarations, and anyone who wants exports and package checks generated by the bundler.
Same idea, different engines and a hand-over
tsup made library builds a one-liner: esbuild compiles and bundles the JavaScript, and a separate Rollup pass with rollup-plugin-dts bundles the declaration files using the TypeScript compiler API. tsdown keeps the one-liner and swaps the engine. Rolldown does the bundling, Oxc does the TypeScript transform, and rolldown-plugin-dts produces declarations with tsc, the native tsgo compiler or, when isolatedDeclarations is on, Oxc's much faster transform. tsdown's docs call it the spiritual successor to tsup and say it incorporates parts of tsup's code. The hand-over is now explicit: tsup's README starts with a warning that the project is not actively maintained and links to tsdown's migration guide. That does not mean tsup is frozen. Version 9.0.0 on 14 October 2026 raised the Node.js floor to 22.18, upgraded esbuild to 0.28 and fixed a tsconfig baseUrl issue. But the release notes are short, the 400 open issues are not being worked down, and the energy is in tsdown, which shipped six releases between 10 October and 6 November 2026. Both tools now require the same Node.js versions to build: ^22.18.0, ^24.11.0 or >=26.0.0. Your published output can still target older runtimes through the target option.
What we measured: build times and output
On 1 December 2026 we installed tsup 9.0.0 and tsdown 0.23.7 (Rolldown 1.3.4) side by side on Node.js 22.23.5 in a 2-vCPU sandbox and pinned each build to one core. With typescript 7.0.2 included, the install was 48 packages and 55 MB for tsup against 28 packages and 60 MB for tsdown. A three-file library built to ESM and CJS in 288-363 ms with tsup and 128-138 ms with tsdown, wall clock including Node.js start. We then generated a 600-module library in which each module exports an interface, a type, a function and a class and imports the previous module. ESM plus CJS without declarations took 1,127-1,287 ms with tsup and 500-597 ms with tsdown over three runs. Adding declaration files with TypeScript 6.0.3 took 7,086-7,443 ms against 4,904-5,054 ms. With isolatedDeclarations enabled and explicit types on class fields, tsdown switched to Oxc and finished in 2,339-2,441 ms. Unminified output was also smaller from tsdown: 230,296 bytes ESM, 250,538 CJS and 197,119 of declarations, against 252,510, 281,869 and 209,307 from tsup. Both removed an unused export from the bundle, and require() of either CJS build returned the same three exports.
TypeScript 7 broke tsup's declaration build
The typescript 7.0.2 package ships the native compiler and, in the words of the error tsup printed, TypeScript 7 does not ship a compiler API. That matters for tsup, because its --dts step calls that API. With typescript 7.0.2 installed, tsup 9.0.0 built the JavaScript and then stopped with: rollup-plugin-dts requires the TypeScript compiler API, the installed [email protected] does not provide it, and the @typescript/typescript6 fallback is not installed. Installing @typescript/typescript6 (6.0.2) as suggested moved the failure one step later: TypeError, parseJsonConfigFileContent is not a function, thrown from tsup's own tsconfig parsing, which still imports the typescript package directly. Pinning typescript to 6.0.3 made tsup's declarations work again. tsdown with the same typescript 7.0.2 install emitted .d.mts and .d.cts files using the tsgo generator, with a warning that the tsgo generator on TypeScript 7.0 is deprecated and will be removed in the next minor, so upgrade to 7.1 or later. If your editor or CI is moving to TypeScript 7, that alone decides the question for any library that publishes types: tsup needs TypeScript 6 kept around for builds, tsdown does not.
Defaults that change your dist folder
tsdown's migration guide lists the default changes, and we confirmed each one. A bare build of the same entry produced CommonJS dist/index.js with tsup and ESM dist/index.mjs plus dist/index.d.mts with tsdown. Declarations appeared even though our package.json had no types field: tsdown also turns dts on when tsconfig has declaration: true (its options code sets dts from compilerOptions.declaration), and removing that flag stopped them. A stale file we left in dist survived a tsup build and was deleted by tsdown, which cleans outDir by default. With two entries sharing a util module, tsup wrote a shared chunk for ESM but duplicated the code into each CJS file, while tsdown wrote util chunks for both formats; tsdown's docs say splitting cannot be disabled. File names differ too: in our package.json with no type field, tsup emitted index.js, index.mjs, index.d.ts and index.d.mts, while tsdown emitted .mjs, .cjs, .d.mts and .d.cts. With exports: true, tsdown rewrote package.json with main, module, types and an exports map for both entries. Each of these is reasonable, but together they mean that swapping the dependency without checking dist and package.json can publish a package that no longer resolves for some consumers.
Migration traps and when not to move yet
The biggest trap is silence. tsdown 0.23 removed the tsup-compatible names (bundle, outExtension, publicDir, skipNodeModulesBundle, removeNodeProtocol, injectStyle, entryPoints), and its docs say they now fail type checking and are silently ignored at runtime. We confirmed it: a tsdown.config.ts with bundle: false and an outExtension function, cast to any, produced a normal bundled build with .mjs files and no warning. That is why npx tsdown-migrate installs tsdown 0.22.14 first, the last version that still warns on those options; clear every warning there, then upgrade. external and noExternal still work in 0.23 but warn, in favour of deps.neverBundle and deps.alwaysBundle. esbuild plugins must be replaced with Rolldown, Rollup or unplugin plugins (unplugin users change the import path to /rolldown). IIFE builds are named .iife.js unless you set outputOptions.entryFileNames. Do not move yet if you rely on splitting: false, metafile, swc or legacyOutput, which tsdown does not offer, or if a release is due this week; tsup 9 on TypeScript 6 still works. Also budget for churn: tsdown is pre-1.0, and both 0.23.0 and 0.23.7 changed configuration behaviour within three months.
Verdict
Pick tsdown for new libraries. In our runs it built twice as fast as tsup with or without declaration files, cut declaration time in half again with isolatedDeclarations, worked with TypeScript 7 where tsup's dts step failed, and generates the package.json exports map that you otherwise maintain by hand. tsup's own README now sends you there. For existing tsup projects, migrate deliberately rather than by swapping the dependency: run npx tsdown-migrate, which installs tsdown 0.22.14 so you can clear every deprecation warning before upgrading to 0.23, then diff your dist folder and package.json exports, because the defaults (ESM only, clean, automatic dts, forced splitting) and file extensions differ. Stay on tsup 9 for now if you rely on esbuild plugins, on disabling code splitting, on metafiles, or on IIFE files named .global.js and have no time to adapt, and pin TypeScript to 6.x while you do, since tsup's declaration build did not work with TypeScript 7.0.2 in our test. Treat that as a holding position, not a destination.

