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)
0.21.9
(latest)
Release notes
🚀 Features
- Upgrade rolldown - by @sxzz (2d74e)
- config: Track transitive config dependencies for watch reload - by @sxzz in https://github.com/rolldown/tsdown/issues/919 (16e27)
- exports: Add bin to publishConfig when devExports is enabled - by @sxzz in https://github.com/rolldown/tsdown/issues/911 (60592)
- plugin: Add
tsdownConfigandtsdownConfigResolvedplugin hooks - by @sxzz in https://github.com/rolldown/tsdown/issues/918 (665e5)
🐞 Bug Fixes
- Skip package.json writting when content is deeply equal - by @ocavue and @sxzz in https://github.com/rolldown/tsdown/issues/913 (d8e1c)
- Skip Node.js version check in Bun - by @sxzz (38afd)
- css: Detect css modules from full id for vue virtual sfc styles - by @sxzz in https://github.com/rolldown/tsdown/issues/917 (e6021)
View changes on GitHub
0.21.8
Release notes
🚀 Features
- Upgrade rolldown - by @sxzz (7f887)
- attw: Improve
ignoreRulestype to autocomplete known values - by @mrlubos in https://github.com/rolldown/tsdown/issues/892 (c8f5c) - create-tsdown: Add Vite Plus template option - by @sxzz (daed0)
- exports: Add
extensionsoption for subpath export keys - by @SinhSinhAn and @sxzz in https://github.com/rolldown/tsdown/issues/899 (1bb7a) - target: Add support for
baseline-widely-availabletarget - by @sxzz in https://github.com/rolldown/tsdown/issues/896 (d6a16)
🐞 Bug Fixes
- Export type only for cjs dts re-export - by @sxzz (25510)
- Exclude shim file from bundled dependency hint - by @sxzz in https://github.com/rolldown/tsdown/issues/909 (3f8de)
- dts: Skip cjs dts reexport for non-entry chunks - by @sxzz (5fee2)
View changes on GitHub
0.21.7
Release notes
🚀 Features
- Add
moduleoption 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
Release notes
🚀 Features
- Upgrade rolldown to v1.0.0-rc.12 - by @sxzz (51292)
- config:
- dts:
- Add
cjsReexportoption to eliminate dual module type hazard - by @mandarini and @sxzz in https://github.com/rolldown/tsdown/issues/856 (875c1)
- Add
- exports:
- Add
binoption to auto-generate package.json bin field - by @sxzz in https://github.com/rolldown/tsdown/issues/869 (7ebd6)
- Add
🐞 Bug Fixes
- css:
- Compile preprocessor langs in virtual CSS modules - by @sxzz in https://github.com/rolldown/tsdown/issues/865 (7b2e0)
- Strip
.modulefrom CSS output filenames - by @sxzz in https://github.com/rolldown/tsdown/issues/866 (03ade) - Default splitting to true in unbundle mode for CSS inject - by @sxzz in https://github.com/rolldown/tsdown/issues/867 (a4da6)
- Split CSS plugin into pre/post phases for scoped CSS support - by @sxzz in https://github.com/rolldown/tsdown/issues/870 (ff0c4)
- entry:
- Correctly output relative paths in logger output - by @sxzz (00050)
View changes on GitHub
0.21.5
Release notes
🚀 Features
- Update rolldown to 1.0.0-rc.10 - by @wChenonly in https://github.com/rolldown/tsdown/issues/845 (41411)
- Support typescript v6 - by @ocavue in https://github.com/rolldown/tsdown/issues/858 (bffc4)
🐞 Bug Fixes
- css:
- Run final minification on merged CSS output - by @sxzz in https://github.com/rolldown/tsdown/issues/853 (475df)
- Don't override internal importer - by @Laupetin in https://github.com/rolldown/tsdown/issues/860 (af40e)
- Use aliased exports for CSS module keys - by @wChenonly and @sxzz in https://github.com/rolldown/tsdown/issues/840 (bb6de)
- deps:
- External
optionalDependenciesby default - by @sxzz (cd24d) - Resolve subpath extensions for packages without exports field - by @sxzz in https://github.com/rolldown/tsdown/issues/863 (c5150)
- Correctly resolve root
@typespackages for dts deep imports - by @brc-dd and @sxzz in https://github.com/rolldown/tsdown/issues/852 (0b276)
- External
View changes on GitHub
0.21.4
Release notes
🚀 Features
- css: Add CSS modules support - by @sxzz in https://github.com/rolldown/tsdown/issues/834 (2a88a)
🐞 Bug Fixes
- exports: Preserve CRLF line endings in package.json - by @sxzz (a4d4e)
View changes on GitHub
0.21.3
Release notes
🚀 Features
- copy: Add support for watching copy source files - by @schplitt in https://github.com/rolldown/tsdown/issues/721 (7c23a)
🐞 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
Release notes
🚨 Breaking Changes
- exe: Add
exe.outDirfor separate executable output dir, defaults tobuild- by @sxzz (d49ef)
Note: Executable is still an experimental feature and does not follow SemVer. Breaking changes may occur in any release.
🚀 Features
- Add
rootoption for controlling output directory structure - by @sxzz (bad2d) - deps: Rename
onlyAllowBundletoonlyBundle- by @peaklabs-dev and @sxzz in https://github.com/rolldown/tsdown/issues/819 (cbd7b)
🐞 Bug Fixes
- css: Skip data URIs and external URLs in CSS url() rebasing - by @sxzz (13907)
View changes on GitHub
0.21.1
Release notes
🚨 Breaking Changes
- css: Move all CSS support to
@tsdown/csspackage - by @sxzz in https://github.com/rolldown/tsdown/issues/809 (1b1a1)
[!IMPORTANT] If you are using CSS features (e.g., CSS imports), you now need to manually install the
@tsdown/csspackage:npm install @tsdown/css -D # or pnpm add @tsdown/css -DNote: CSS support is still an experimental feature and does not follow SemVer. Breaking changes may occur in any release.
🚀 Features
- css:
- Add
css.injectoption to preserve CSS imports in JS output - by @sxzz and Claude Haiku 4.5 in https://github.com/rolldown/tsdown/issues/808 (ad745) - Support
?inlinequery for CSS imports - by @sxzz in https://github.com/rolldown/tsdown/issues/810 (b7379) - Support
node_modulespackage resolution - by @sxzz and Claude Haiku 4.5 in https://github.com/rolldown/tsdown/issues/812 (b06b4)
- Add
🐞 Bug Fixes
- Generate correct filename for sass files when dts is enabled - by @ocavue in https://github.com/rolldown/tsdown/issues/802 (848a7)
- css:
- Handle virtual module IDs from framework plugins - by @sxzz (c421f)
- Ignore css imports with URL query - by @ocavue and @sxzz in https://github.com/rolldown/tsdown/issues/806 (c1d23)
View changes on GitHub
0.21.0
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.neverBundlenoExternal->deps.alwaysBundleinlineOnly->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
- 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 https://github.com/rolldown/tsdown/issues/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:
- Implement full CSS pipeline as Rolldown plugin - by @sxzz in https://github.com/rolldown/tsdown/issues/787 (dbe3c)
- Extract CSS pipeline into
@tsdown/csspackage - by @sxzz in https://github.com/rolldown/tsdown/issues/790 (e4cbe) - Add PostCSS support with
css.transformeroption - by @sxzz in https://github.com/rolldown/tsdown/issues/791 (35bef) - Default
css.transformertolightningcss- by @sxzz in https://github.com/rolldown/tsdown/issues/797 (288a5)
- exe:
- Add experimental Node.js SEA executable bundling - by @sxzz in https://github.com/rolldown/tsdown/issues/777 (418d5)
- Add cross-platform executable building via
@tsdown/exe- by @sxzz in https://github.com/rolldown/tsdown/issues/786 (b6833) - Support
latestandlatest-ltsfor nodeVersion - by @sxzz (ce7ab)
- exports:
- Support object option for
customExports- by @Joery-M and @sxzz in https://github.com/rolldown/tsdown/issues/769 (7fb72) - Add
inlinedDependenciesfield to package.json - by @sxzz in https://github.com/rolldown/tsdown/issues/785 (5c71f)
- Support object option for
- migrate:
- Migrate external/noExternal to deps namespace - by @sxzz (c59e7)
🐞 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 https://github.com/rolldown/tsdown/issues/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 https://github.com/rolldown/tsdown/issues/780 (afaab)
- css: Remove empty js chunks - by @ocavue and @sxzz in https://github.com/rolldown/tsdown/issues/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 https://github.com/rolldown/tsdown/issues/773 (b1dd2)
- watch: Re-glob entry files on create/delete events - by @sxzz (a1969)