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.neverBundlenoExternal->deps.alwaysBundleinlineOnly->deps.onlyAllowBundleskipNodeModulesBundle->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
- Update dependency options: Rename
external->deps.neverBundle,noExternal->deps.alwaysBundle, etc. - Check
failOnWarn: If you need warnings to fail the build in CI, explicitly setfailOnWarn: 'ci-only'orfailOnWarn: true. - Upgrade Node.js: Ensure you're running Node.js >= 22.18.0 to avoid deprecation warnings.
Links
- tsdown Documentation
- v0.21.0-beta.1 Release
- v0.21.0-beta.2 Release
- v0.21.0-beta.3 Release
- v0.21.0-beta.4 Release
- v0.21.0-beta.5 Release
- Full diff from v0.20.3
🚨 Breaking Changes
- Change
failOnWarndefault from 'ci-only' to false - by @sxzz (ad8db) - exe: Require Node >=25.7 and default format to esm - by @sxzz in #798 (0173c)
🚀 Features
- Rename dependency options to
depsnamespace - by @sxzz (7f509) - Upgrade rolldown - by @sxzz (7a528)
- Deprecate Node.js versions below 22.18.0 - by @sxzz (439f1)
- Support bundling
.nodefiles by default - by @sxzz (944e9) - css:
- exe:
- exports:
- migrate:
🐞 Bug Fixes
- Apply
failOnWarnto rolldown logs - by @sxzz (149dc) - Debounce
onSuccessin watch mode to prevent duplicate execution - by @sxzz (af748) - Don't fail on PLUGIN_TIMINGS warnings when failOnWarn is enabled - by @sxzz (9872a)
- Resolve css files in node_modules - by @ocavue, @sxzz and Rei in #795 (d8a1f)
- config: Handle known Node.js bug in nativeImport error handling - by @sxzz (e4230)
- copy: Don't warn if no files specified - by @adamlohner, @cursoragent and @sxzz in #780 (afaab)
- css: Remove empty js chunks - by @ocavue and @sxzz in #799 (1183a)
- exe: Use runtime semver check for ESM SEA default format - by @sxzz (5321c)
- exports: Include non-entry chunks in exports when
allis true - by @sxzz (79492) - hooks: Set cwd for onSuccess - by @sxzz (c114a)
- node-protocol: Respect alias and tsconfig paths when stripping node: prefix - by @lazuee in #773 (b1dd2)
- watch: Re-glob entry files on create/delete events - by @sxzz (a1969)