npm / tsdown
tsdown
What changed in tsdown 0.15 to 0.23, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
51 breaking5 deprecations53 new APIs and options4 performance42 behavior and defaults10 tooling73 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inittsdown 0.2331 changes
Breaking changes 19
The asyncDispose polyfill was removed.
The default profile changed from strict to esm-only; set profile: 'strict' to preserve the previous checks.
build() now returns { bundles, watch }, so callers should destructure bundles from the result.
Replace bundle: false with unbundle: true; bundle: true can be removed.
Use copy instead of publicDir or --public-dir.
Use --copy instead of --public-dir.
Use css.inject in place of injectStyle.
Custom languages, including vue, now throw when combined with an incompatible generator.
Use deps.neverBundle: true instead of skipNodeModulesBundle: true.
Use deps.onlyBundle instead of inlineOnly or deps.onlyAllowBundle.
The option was removed; dual-format builds now generate CJS declarations in a separate pass.
Use dts.customLanguages instead of dts.volarPlugins, and rename each language's create hook to createVolarPlugins.
This is now the only way to select a declaration generator; use 'oxc' or 'tsgo' instead of dts.oxc or dts.tsgo booleans.
Nested flag keys are now camel-cased.
Node.js 25 is no longer supported; use ^22.18.0, ^24.11.0, or >=26.0.0.
Replace removeNodeProtocol: true with nodeProtocol: 'strip'.
Use outExtensions in place of the renamed outExtension option.
The option now defaults to false; set it to true to preserve the previous behavior.
Legacy types and typesVersions fallbacks were removed; use TypeScript's bundler, node16, or nodenext module resolution.
New APIs and options 3
css.modules.localsConvention now supports a function form.
The summary option skips per-file size logs.
Programmatic watch controls are now exposed through the build result.
Behavior and default changes 4
Inlined dependencies are now scoped to configurations with exports.
Files imported through CSS @import are now watched.
The migration tool now supports non-interactive environments.
Optional dependencies are now ignored in type definitions.
Tooling 1
tsdown now allows unplugin-unused v0.5+.
Fixes and other changes 4
Object entries now honor a custom root.
The dry-run publish command now packs the tarball.
False tsconfig option values are preserved instead of being overridden.
resolveDepSubpath is now applied when neverBundle is true.
tsdown 0.2237 changes
Breaking changes 6
The minimum Node.js version for exe is standardized, which may affect which Node.js versions developers can use.
Node.js 24.0–24.10 are no longer supported.
Support for Node.js 23 is explicitly dropped.
tsdown now requires Node.js 22.18.0 or later; Bun and Deno remain supported experimentally.
tsdown now uses pkg from publint results and requires publint v0.3.8 or later.
unrun is no longer bundled. Install it manually when your environment needs it with the default auto config loader.
New APIs and options 9
Adds a CLI option to control build concurrency.
Setting deps.neverBundle to true externalizes all dependencies.
Adds the resolveDepSubpath option for dependency subpath resolution.
The exe feature supports a custom Node index and download URL.
Adds the onlyImport option to deps.
Adds the logger option suppressWarnings to filter warnings.
Exports the tsdown version for use by consumers.
Adds deps.dts to override dependency bundling for declaration files.
tsx can now be used as an alternative config loader; install it manually when needed.
Performance 3
Reduces the size of the tsdown installation.
Reuses the Sass async compiler when processing CSS.
Skips renderChunk when no CSS has been collected, avoiding unnecessary work.
Behavior and default changes 2
tsdown now detects shebangs in entry chunks and automatically writes a bin field in package.json; set exports.bin to false to opt out.
When compilerOptions.declaration is true, tsdown now auto-enables dts; set dts: false to opt out.
Tooling 1
tsdown supports TS 7.
Fixes and other changes 16
tinyexec no longer modifies PATH.
Dependencies listed through peerDependenciesMeta are handled as external dependencies.
The exe feature handles Windows Node archives when running on Linux.
Dynamic imports are now checked in onlyImport.
Plugin arrays are concatenated when merging config.
Banner/footer function addons are evaluated per chunk.
Unbundled CJS output no longer emits the ESM shim banner.
Skips the cd hint when the current directory is selected.
Generates source maps to avoid the SOURCEMAP_BROKEN warning.
The option is respected regardless of the logger level.
Fixes inline CI detection.
Adds extra space for emoji rendering in Windows Terminal.
Adds shims support for unbundled builds.
Improves error handling for unsupported TypeScript syntax on Node.js.
The logic for duplicate configuration warnings has been fixed.
tsdown now detects types fields nested in conditional exports.
tsdown 0.2172 changes
Breaking changes 8
The
.modulesuffix is stripped from CSS output filenames.optionalDependencies are external by default.
Renames
onlyAllowBundletoonlyBundlein deps configuration.CSS support moved to @tsdown/css; users of CSS features such as CSS imports must install the package manually.
The 0.21.0 name for the renamed
inlineOnlydependency option.Moves
skipNodeModulesBundleunder thedepsnamespace.Executable bundling now defaults to ESM format.
Executable bundling requires Node.js 25.7 or newer.
Deprecations 3
Replaces
noExternalfor dependencies that should always be bundled; the old option still works but is deprecated and emits warnings.Replaces
externalfor dependencies that should never be bundled; the old option still works but is deprecated and emits warnings.Running on Node.js below 22.18.0 now emits a deprecation warning.
New APIs and options 21
Adds the tsdownConfig plugin hook.
Adds the tsdownConfigResolved plugin hook.
The exports option adds extensions for subpath export keys.
The target option now supports baseline-widely-available.
create-tsdown adds a Vite Plus template option.
Adds a module option for attw and publint to pass imported modules directly.
Adds a bin option that automatically generates the package.json bin field.
Adds the cjsReexport option to eliminate the dual module type hazard.
Workspace config functions now receive the root config, allowing them to use root configuration when generating workspace configs.
Adds CSS modules support.
Adds a separate output directory for executables; it defaults to build.
Adds an option for controlling output directory structure.
The new option preserves CSS imports in JavaScript output.
CSS imports support the
?inlinequery.Selects the CSS transformer and adds PostCSS support.
Accepts an object format for finer-grained control over the generated exports field.
Enables experimental bundling of a TypeScript project into a standalone Node.js SEA executable.
When using the
exportsfeature, tsdown automatically adds a package.json field listing dependencies bundled into the output.Supports
latestandlatest-ltsas values fornodeVersion.CSS pipeline is extracted into a package and implemented as a native Rolldown plugin, with Lightning CSS and PostCSS support.
Provides cross-platform executable building support for Node.js SEA bundling.
Behavior and default changes 11
When devExports is enabled, bin is added to publishConfig.
Transitive config dependencies are tracked so changes to them trigger watch reloads.
Splitting now defaults to true in unbundle mode for CSS inject.
Workspace configs are merged with mergeConfig, and variadic overrides are supported.
Copy source files are now watched, so changes to them can be picked up in watch mode.
Defaults to Lightning CSS.
When
allis true, non-entry chunks are included in exports.Defaults to
falseinstead ofci-only; explicitly settrueorci-onlyif warnings should fail builds in CI.Now applies to Rolldown logs.
.nodefiles are now bundled by default.CSS support can resolve packages from node_modules.
Tooling 2
The ignoreRules type now autocompletes known values, making valid rule choices easier to discover.
TypeScript v6 is supported, allowing projects using that version to use tsdown.
Fixes and other changes 27
CSS modules are detected from the full id for Vue virtual SFC styles.
The Node.js version check is skipped when running in Bun.
Skips writing package.json when its content is deeply equal.
Shim files are excluded from bundled dependency hints.
CJS dts re-exports now export types only.
CJS dts re-exports are skipped for non-entry chunks.
Relative paths are now output correctly in logger messages.
The CSS plugin is split into pre- and post-phases to support scoped CSS.
Preprocessor languages are now compiled in virtual CSS modules.
The internal importer is no longer overridden during CSS processing.
CSS module keys now use aliased exports.
Final minification now runs on merged CSS output.
Subpath extensions are resolved for packages without an exports field.
Root @types packages are resolved correctly for declaration-file deep imports.
Preserves CRLF line endings in package.json.
Inline CSS files are now watched in watch mode.
Inlined dependencies are sorted by package name.
The unbundle root is now the lowest common ancestor of the entry files.
publint now supports Yarn v1.
Data URIs and external URLs are skipped when rebasing CSS url() references.
CSS imports with URL queries are ignored.
Correct filenames are generated for Sass files when dts is enabled.
CSS handling now accommodates virtual module IDs from framework plugins.
Does not fail builds on PLUGIN_TIMINGS warnings when enabled.
Watch-mode executions are debounced to prevent duplicate execution.
The current working directory is now set for the hook.
Entry files are re-globbed after create and delete events.
tsdown 0.2014 changes
Breaking changes 2
Using skipNodeModulesBundle and noExternal together now throws an error.
The dts.resolve option was removed; update configurations that use it.
New APIs and options 1
An option was added to disable the legacy CJS warning.
Performance 1
External plugin filtering now uses a native filter.
Behavior and default changes 4
Unused inlineOnly entries now produce a hint message, helping keep the option clean.
Shows warnings when dependencies are bundled in inline-only mode.
Entry configuration now supports mixing array and object entries.
The inlineOnly option now applies to declaration files.
Fixes and other changes 6
The import condition is now ordered before require in exports.
Type-only packages matching @types/* are now external.
Build output path separators are normalized on Windows.
The configuration is reloaded when the process restarts.
A typo in config extensions was fixed.
parseEnv is now optional.
tsdown 0.1914 changes
Breaking changes 7
The option was renamed to devtools.
The option was renamed to devtools.ui.
The option was renamed to debug.
Excluded entries no longer include the extension name.
Adds the legacy option; for pure ESM, main and module fields are removed.
The types field is auto-filled only when exports.legacy is enabled.
The deprecated option was removed.
New APIs and options 2
The enableDebug API is exposed.
The resolveUserConfig API is exposed.
Behavior and default changes 2
CSS exports are generated when CSS splitting is disabled.
The console is cleared when a rebuild starts.
Tooling 1
The migrate command now supports monorepos.
Fixes and other changes 2
The version check for require ESM support was updated.
The typeAssert utility is available again.
tsdown 0.1821 changes
Deprecations 1
Warns that removeNodeProtocol is deprecated.
New APIs and options 6
Adds support for splitting CSS code.
Adds the packageJson option to exports configuration.
Exports mergeConfig so developers can use it from the package.
Adds an option to filter specified attw rules.
Adds the envFile option.
Adds the envPrefix option.
Behavior and default changes 8
Entry supports multiple patterns with the same base.
Object entry supports glob negation patterns.
Supports glob patterns for exports.exclude.
Supports glob patterns for inlineOnly.
Supports glob patterns for noExternal.
Object entry keys now support glob patterns, allowing multiple entry points to be matched with patterns.
The exports option is now marked as a stable feature.
The copy behavior is reworked to sync with rollup-plugin-copy.
Fixes and other changes 6
Inlines the PackageJson type.
Shows the full entrypoint.
Removes dot files when cleaning.
Fixes skipNodeModulesBundle for monorepos.
The banner option is kept as-is.
The footer option is kept as-is.
tsdown 0.1727 changes
Breaking changes 4
The sync behavior of rollup-plugin-copy is now used, which may affect when copied files are available.
The profile value
esmOnlyis renamed toesm-only.failOnWarn is enabled by default in CI, so warnings cause CI builds to fail unless configured otherwise.
The workspace cwd now defaults to the config directory.
New APIs and options 4
The exports option gains an exclude option.
Options can now be overridden by output format.
WatchPlugin is now exported for use by developers.
A write option is available to control writing build output.
Behavior and default changes 9
The cwd value is now resolved from the user config.
Shortcuts are now case insensitive.
The copy option supports glob patterns.
Errors now print their stack.
The rebuilt message now includes the config name.
The build:done hook now includes chunks.
Outputs from multiple configs are now merged for exports.
The migrate command now migrates optionalDependencies.
Filtering is now supported for all workspace configs.
Tooling 4
Multi-config builds now support attw.
Multi-config builds now support exports.
tsdown uses the Rolldown native watcher.
Multi-config builds now support publint.
Fixes and other changes 6
Hooks are called for each format.
Input and output options are merged.
Fixes handling of an empty clean array.
The clean setting is now respected in watch mode.
Functions provided for copy are now called.
The ordering is corrected so require comes before import.
tsdown 0.1616 changes
Breaking changes 5
Replaces the --debug CLI flag.
Defaults to true when platform is node, fixing output extensions as .cjs or .mjs instead of determining them from package.json type; this may affect package.json entry fields.
The former Options interface is now named InlineConfig.
ResolvedOptions is renamed to ResolvedConfig.
NormalizedUserConfig is renamed to UserConfig.
Deprecations 1
Deprecates the
esmOnlyprofile value; useesm-onlyinstead.
New APIs and options 4
Adds an enabled option to feature options.
Addon features support ci-only and local-only.
The create-tsdown template choices now include a react-compiler template.
Adds a Svelte template to create-tsdown.
Behavior and default changes 2
Glob support is enabled automatically for entries.
Entry extensions can be inferred.
Tooling 1
Adds tsdown debug mode and Vite DevTools integration.
Fixes and other changes 3
Output for exports now uses correct indentation.
Improves attw execution and includes the package name in its output.
Sets root to the current working directory.
tsdown 0.156 changes
New APIs and options 3
tsdown now supports configuring TreeshakingOptions.
Adds unrun as a config loader.
Adds the ability to write config for debugging.
Fixes and other changes 3
The unrun option is now optional.
Corrects generated export paths for nested index files.
Fixes invalid number targets.