tsdown@0.20.3

The Elegant Bundler for Libraries

Upgrade Path

You are on 0.20.3, latest is 0.21.9 (10 versions behind). View full diff on GitHub

Version History (10 versions)
Version
Released
Size
Links
0.21.9 (latest)
2026-04-16
167.0 kB (+13%)
Release notes

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub
0.21.8
2026-04-13
162.4 kB (+10%)
Release notes

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub
0.21.7
2026-03-28
160.6 kB (+9%)
Release notes

   🚀 Features

  • Add module option for attw and publint to allow passing imported modules directly  -  by @sxzz (31e90)

   🐞 Bug Fixes

  • deps: Add skipNodeModulesBundle dep subpath e2e tests and fix docs  -  by @sxzz (deff7)
    View changes on GitHub
0.21.6
2026-03-27
160.3 kB (+8%)
Release notes

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub
0.21.5
2026-03-25
155.6 kB (+5%)
Release notes

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub
0.21.4
2026-03-16
154.1 kB (+4%)
Release notes

   🚀 Features

   🐞 Bug Fixes

  • exports: Preserve CRLF line endings in package.json  -  by @sxzz (a4d4e)
    View changes on GitHub
0.21.3
2026-03-15
154.0 kB (+4%)
Release notes

   🚀 Features

   🐞 Bug Fixes

  • css: Watch inline CSS files in watch mode  -  by @sxzz (2051a)
  • exports: Sort inlined dependencies by package name  -  by @sxzz (0ec71)
  • publint: Support Yarn v1  -  by @sxzz (4a291)
  • unbundle: Root should be lowest common ancestor of entry files  -  by @sxzz (f1823)
    View changes on GitHub
0.21.2
2026-03-11
161.9 kB (+10%)
Release notes

   🚨 Breaking Changes

  • exe: Add exe.outDir for separate executable output dir, defaults to build  -  by @sxzz (d49ef)

Note: Executable is still an experimental feature and does not follow SemVer. Breaking changes may occur in any release.

   🚀 Features

   🐞 Bug Fixes

  • css: Skip data URIs and external URLs in CSS url() rebasing  -  by @sxzz (13907)
    View changes on GitHub
0.21.1
2026-03-09
160.6 kB (+9%)
Release notes

   🚨 Breaking Changes

[!IMPORTANT] If you are using CSS features (e.g., CSS imports), you now need to manually install the @tsdown/css package:

npm install @tsdown/css -D
        # or
        pnpm add @tsdown/css -D
        

Note: CSS support is still an experimental feature and does not follow SemVer. Breaking changes may occur in any release.

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub
0.21.0
2026-03-05
169.7 kB (+15%)
Release notes

v0.21.0 - Notable Changes

Breaking Changes

Dependency options renamed to deps namespace

The dependency-related options have been moved under a new deps namespace with clearer names:

  • external -> deps.neverBundle
  • noExternal -> deps.alwaysBundle
  • inlineOnly -> deps.onlyBundle (0.21.1+) deps.onlyAllowBundle (0.21.0)
  • skipNodeModulesBundle -> deps.skipNodeModulesBundle

Before:

export default defineConfig({
          external: ['vue'],
          noExternal: ['lodash'],
        })
        

After:

export default defineConfig({
          deps: {
            neverBundle: ['vue'],
            alwaysBundle: ['lodash'],
          },
        })
        

The old options still work but are deprecated and will emit warnings.

failOnWarn default changed from 'ci-only' to false

If you relied on the previous behavior where warnings would fail the build in CI environments, you now need to explicitly set failOnWarn: true or failOnWarn: 'ci-only' in your config.

Node.js < 22.18.0 deprecated

tsdown now emits a deprecation warning when running on Node.js versions below 22.18.0. Plan to upgrade your Node.js version accordingly.

New Features

Experimental Node.js SEA executable bundling (exe)

tsdown can now bundle your TypeScript project into a standalone executable using Node.js Single Executable Applications (SEA). A new @tsdown/exe package provides cross-platform executable building support. See the exe documentation for details.

export default defineConfig({
          exe: true, // or { useCodeCache: true, useSnapshot: true }
        })
        

Full CSS pipeline with @tsdown/css

CSS handling has been reimplemented as a native Rolldown plugin and extracted into the @tsdown/css package, providing a complete CSS pipeline with Lightning CSS and PostCSS support via the css.transformer option. See the CSS documentation for details.

inlinedDependencies field in package.json

When using the exports feature, tsdown now auto-generates an inlinedDependencies field in your package.json, listing dependencies that are bundled into the output.

Object option for customExports

customExports now supports an object format for more fine-grained control over the generated exports field.

Migration Guide

  1. Update dependency options: Rename external -> deps.neverBundle, noExternal -> deps.alwaysBundle, etc.
  2. Check failOnWarn: If you need warnings to fail the build in CI, explicitly set failOnWarn: 'ci-only' or failOnWarn: true.
  3. Upgrade Node.js: Ensure you're running Node.js >= 22.18.0 to avoid deprecation warnings.

Links


   🚨 Breaking Changes

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub