npm / rolldown
rolldown
What changed in rolldown 1, from its official release notes, upgrade guides and advisories. Also covers @rolldown/perf-kit. Sources checked 2026-12-04.
20 breaking4 deprecations37 new APIs and options18 performance32 behavior and defaults17 tooling278 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initrolldown 1406 changes
Breaking changes 20
A moduleSideEffects rule without test and external is rejected.
Errors from the onLog hook now propagate and fail the build.
A preserved JSX tag importing a non-identifier name now produces an error instead of a panic.
The option was removed after being enabled by default in dev.
Calling this.load() in buildStart is now rejected.
JSON parsing now preserves __proto__ as an own data property.
Module namespace objects now have a null prototype and are non-extensible.
Directory cleanup no longer follows symlinks in the output directory.
Preserved output filenames now retain non-JS extensions in [name], so data.json becomes data.json.js and Comp.vue becomes Comp.vue.js; update libraries' exports paths if needed.
The CLI now rejects combining --input with positional entries. Use positional entries or repeat --input instead.
JSON modules with a non-object root are unwrapped.
Dev mode now rejects non-ESM output formats.
The deprecated watch.notify option was removed.
Circular star reexports now resolve as null.
String id filters are rejected; filters must be a RegExp.
An invalid test regex in a manualCodeSplitting group is now reported as an error.
Auto-discovery no longer applies the outermost ancestor tsconfig to files that no project owns, preventing those files from inheriting aliases.
Project-reference resolution now follows TypeScript: auto-discovery walks upward for a config that owns the file, referenced projects can take precedence over the root, and each project's own
allowJsdetermines JavaScript inclusion.The defer keyword can now be dropped.
__toESM is no longer inherited across chunks for named-only external imports.
Deprecations 4
pluginTimings is a deprecated alias for checks.bundlerTimings.
Adds the MODULE_LEVEL_DIRECTIVE warning for module-level directives.
Adds a warning for conflicting star re-exports.
Adds a warning for sourcemap issues in
renderChunkandtransformhooks.
New APIs and options 37
Added an include option to rolldown_plugin_chunk_import_map.
The MagicString constructor accepts a hires option.
Common chunks can be inlined using import.meta.ROLLDOWN_FILE_URL_*.
Setting devtools.mode to report writes Markdown and JSON build reports with timing, chunk, module, package, graph, change, and raw metric data.
Enables experimental import attributes: modules imported with different attributes have distinct identities, and json, text, and bytes types work without a plugin. Off by default.
Plugins can read import attributes in resolveId, resolveDynamicImport, load, and transform; resolveId can change them. this.resolve and this.load also accept attributes.
A new package consumes build-report data and measures page LCP/FCP, server readiness, or Cloudflare Worker startup; it can compare results with a fixed baseline.
Adds a server startup mode for Node and Deno.
Added to choose the browser-external stub format.
Adds an option to configure output character encoding.
Adds the experimental.devMode.hotUpdate option.
Passes watch.exclude to notify as its ignore filter.
Experimental support for inlineCommonChunks lets Rolldown inline common chunks containing import() and deduplicate shared code in lazy chunks.
Adds checks.bundlerTimings for bundler timings, with pluginTimings as a deprecated alias.
Adds a dev option to gate the hotUpdate hook.
The compiler cache is enabled via module.enableCompileCache().
Module graph queries are exposed on the dev engine handle.
Minification now supports property name mangling.
The Vite resolve plugin accepts a top-level tsconfig option.
The Vite transform plugin accepts a tsconfig option.
The transform API accepts a tsconfig option.
Adds support for the armv7 Android target.
Adds an allocation-tracking global allocator behind the tracking_allocator feature.
The dev engine bindings expose disableWatcher.
The dev engine supports the hotUpdate hook.
Support for import.meta.ROLLDOWN_FILE_URL_* allows context to be passed to the resolveFileUrl hook.
User callbacks configured on options are timed, with plugin hook measurements reported from Rust after closeBundle has run.
A resolveFileUrl plugin hook is implemented for resolving file URLs.
MagicString supports storeName on overwrite and update.
Adds a FILE_NOT_FOUND error.
Adds the native config loader option.
Adds the sourcemapFileNames option for configuring sourcemap filenames.
Adds support for the
caseSensitiveoption.Supports configuring
includeDependenciesRecursivelylocally for code-splitting groups.Dev mode supports the exclude watcher option.
Dev mode supports the include watcher option.
Adds advice on oversized barrel modules.
Performance 18
Makes the cycle check incremental.
Avoids loading consola when importing rolldown.
Deduplicates shared code along known loading paths.
Calls to sourcemapIgnoreList are batched.
Calls to sourcemapPathTransform are batched.
Fetches a lazy route in one request.
Caches getModuleInfo during code splitting.
Calls to codeSplitting group test and name functions are batched.
Finalization uses less memory.
Minified export names are built without allocating, improving chunk-naming performance.
Chunks that never wrap no longer include the runtime import.
Stops order-sensitivity checks once a module is flagged.
Skips side-effect-free modules in per-entry reachability.
ESM evaluation errors are now cached.
Avoids generating unnecessary intermediate sourcemaps.
Importer existence checks are cached.
Deduplicates already-loaded dynamic dependencies.
Inlines optional-chain enum access.
Behavior and default changes 32
Inline chunks that are also loaded by import().
Plugin timings are now shown as a table.
CommonJS modules in Node ESM output receive __dirname and __filename.
In the browser, cwd defaults to /.
Error and warning diagnostics now respect the NO_COLOR environment variable.
Unused imports of side-effect-free externals are now dropped in ESM output.
The option is supported in dev mode.
Prints record factories parenthesized so they compile eagerly.
In dev mode, inlines chunks that use
import.meta.hot.Uses the
INVALID_TLA_FORMATerror for Rollup compatibility.Folds
'key' in nswhen namespace imports have statically known exports.Routes independent ESM re-exports per consumer during code splitting.
Glob imports now follow file creation and deletion via hotUpdate.
Glob imports now watch the directory each glob reads.
Watch reports only file events.
addWatchFile supports directories.
External require handling prefers module.exports over a namespace spread.
Folds already-loaded side-effectful libraries into eager entries.
Namespace extraction is widened for already-loaded merges, affecting code-splitting behavior.
Code-splitting now supports inlining shared dependencies in dynamic entries.
Modules requiring strict execution order are wrapped on demand.
Newly imported top-level modules no longer ship their factories during development.
Bracket-notation ROLLUP_FILE_URL expressions are treated as side-effect free.
Bracket-notation import.meta['url'] is treated as side-effect free and rewritten.
ROLLUP_FILE_URL expressions are treated as side-effect free.
Top-level import-binding reads are detected as execution-order sensitive, affecting how modules are analyzed.
Lazy barrel is disabled by default, so projects must opt in to use it.
The node require helper is now wrapped in a pure IIFE.
No-op init calls are dropped for empty wrapped-ESM modules.
Defaults to true, so Rolldown skips compiling unused re-exported modules when a barrel is recognized as side-effect-free. Set it to false to opt out.
Rolldown emits warnings for invalid pure annotations.
Calls the moduleParsed hook in ParallelJsPlugin.
Tooling 17
Adds a report mode that produces an agent-readable build metrics report.
Adds a check that compares rendered output against the original build.
Adds a browser page-load performance harness for coding agents.
Development mode records a matcher per glob call.
The dev runtime now ships imported bindings for HMR partial accept.
Timing rows for code-splitting groups are reported separately.
The dev server skips an HMR update when a module's rebuilt output is unchanged.
Development mode adds client-side hot module replacement.
Development mode uses a per-client ship map to size HMR patches.
Development mode sends clients a full-reload update when a tsconfig changes.
Build errors are printed on browser refresh after a failed build.
Devtools makes duplicate packages discoverable.
Devtools classifies package dependency types in the package graph.
Devtools emits package metadata.
Devtools maps packages to modules and chunks.
The devtools package graph emits package size when PackageGraphReady occurs.
Devtools marks packages that are used.
Fixes and other changes 278
The dev server recovers from a rebuild that fails in buildEnd.
Data URL modules retain execution order when chunkModulesOrder is 'module-id'.
External imports retain their source order.
Dynamic entries remain the facade of their codeSplitting group chunk.
A CommonJS entry's module.exports is retained in CJS output.
Internal chunk exports are excluded from dynamic import namespaces.
Entry chunks are ordered by their first-executed module.
Corrected the help text for --format.
Modules in unloaded chunks are no longer treated as already run.
A pass value of 0 disables inline-const.
JSON modules preserve lone UTF-16 surrogates.
Class static blocks are not emitted for targets that do not support them.
MagicString.replace and replaceAll support function replacers.
MagicString.replace and replaceAll now support function replacers.
Corrected the help text for --makeAbsoluteExternalsRelative.
Percent-encoded paths in new URL() are decoded.
The asset is emitted when a plugin loads a new URL() target as code.
Option paths in validation warnings are joined with dots.
Unknown output.esModule strings are rejected.
output.exports is honored for non-entry modules under preserveModules.
Plugin module options are reset when modules are fetched again.
Corrected the help text for --polyfillRequire.
Chunks are created in execution order when preserveModules is enabled.
require passed as a call argument is no longer treated as a require() call.
Module ids starting with rolldown: are no longer special-cased.
The resolver cache is cleared on update watch events.
Relative sources in plugin maps are resolved against the module.
Sourcemap comments are included in chunk hashes.
Top-level await in tree-shaken statements is ignored.
UMD dependencies no longer use host AMD loaders.
Plugin errors and warnings now print their url.
WASI calls made after close() no longer crash.
A module without module syntax is treated as CommonJS when it is both imported and required.
Cross-chunk export names no longer depend on module load order.
References in dead branches inside live functions are dropped before chunk linking.
Detection recognizes __esModule set with Object.defineProperty on module.exports.
Options passed to hooks no longer keep a build's plugins alive.
No-op initialization calls are removed from re-exports and imports.
The declaring module of an inlined constant read through a kept barrel is run to preserve strict execution order.
Statements with instanceof that a constant makes pure are tree-shaken.
A module task panic fails the build instead of leaving it hanging.
Module tasks no longer panic after the build is dropped.
new URL() references are no longer treated as execution dependencies.
Re-export targets that no consumer selects are placed to preserve strict execution order.
Emitted chunks are counted when rendering relative-path externals.
A partial rebuild no longer panics when it adds a relative-path external.
Rendering errors are preserved when renderError fails.
Columns are preserved when a hook returns the native MagicString.
Sourcemaps use the map returned by a hook with the native MagicString.
Top-level await in top-level catch blocks is detected.
var declarations in top-level catch blocks of wrapped modules are hoisted.
Destructuring with an assignment default no longer causes a panic in a wrapped module.
var declarations in top-level for-in and for-of heads of wrapped modules are hoisted.
Transform logs and errors now include the code location when the position is 0.
A declaration keeps its name when that name clashes with an external import.
Same-chunk dynamic imports are omitted from dynamicImports.
The CLI applies --environment before loading the binding.
Namespace markers are skipped when an entry has no exports.
Inlining an exported constant no longer drops the module's side effects.
Sticky regexes are matched only at the start of the string.
Custom options are kept separate across overlapping this.resolve calls.
Top-level statements made dead by imported constants are dropped before chunk linking.
Top-level this in a required module without module syntax is treated as its exports.
Watch mode now matches Rollup for BUNDLE_END output and multi-config watch options.
The CLI now preserves entry arguments that follow a double dash.
Tree-shaking now runs a CommonJS module reached only through export *, preserving its execution.
Tree-shaking no longer drops side effects after an exports.x write in the same CommonJS statement, or statements holding a CommonJS top-level return.
Dynamic import variable handling now escapes import specifiers, supports CRLF line breaks in the static import prefix, and awaits the resolver without blocking a runtime worker.
External imports with different attributes remain distinct in output, and legacy assert attributes are rendered as with attributes. Plugins see attributes in the external module id.
Star re-exports from externals in CommonJS output now respect externalLiveBindings.
Negated ** globs are matched from the walk root, and aliased globs resolve without blocking a runtime worker.
JSON named exports no longer shadow JSON.parse.
Rewriting new URL() now preserves its query and fragment.
CommonJS star re-exports from external modules now honor the configured live-binding behavior.
URLs in sourceMappingURL comments are now escaped.
linux-x64-gnu now runs on older CPUs.
Module names are escaped in generated error stubs.
Module sourcemaps keep only traced sources and names.
Treats
cwdas a literal path in relative glob filters.Preserves exported rest bindings from dynamic imports during tree-shaking.
The wasm binding follows directory symlinks.
Awaits
bundle.close()and cleans up every generated config file.Reports
tsconfigFilePathsfor a tsconfig resolved throughTsconfigCache.Tsconfig is no longer applied when resolving imports from virtual modules.
Transform no longer crashes when the working directory has been deleted.
Keeps common chunk keys unique when inline common chunks are enabled.
Handles external
requirewhenssr.targetiswebworker.Wraps eager modules that forward wrapped definers to preserve strict execution order.
Stops
this.resolverecursion between plugins whenskipSelf: true.Dynamic imports are wrapped in
__vitePreloadonly when their specifiers are static.Reports ASSIGN_TO_IMPORT for writes to re-exported namespace members.
Avoids renaming bindings to fixed names that they would capture.
A repeated
close()call is now a no-op.Keeps an external
require()local in a CJS module off the top-level names.Prints a CommonJS module's top-level
thisas a wrapper parameter rolldown names.Avoids renaming entry top-level bindings onto their nested bindings.
Keeps generated top-level names off inner bindings.
Keeps files loaded by the HMR stage watched when the same task rebuilds.
Watches lazily compiled files even when a build starts first.
Handles
output.charset: 'ascii'when minification is disabled.Keeps internal bindings out of entry exports.
Shims deep namespace reads through default imports.
Shims missing static namespace members.
Preserves sourcemap boundaries when tracing has no mapping.
Accounts for init imports during code splitting.
Avoids eager loading through mixed re-exports.
Tree-shakes expression statements that coerce known constants.
Preserves initialization of wrapped ESM re-exports during tree-shaking.
Uses computed access for arbitrary import names.
Chunk syntax errors now fail, and export names are escaped once.
Dependency paths are escaped in CJS and UMD output.
Avoids cycles caused by redundant re-export initialization.
Export names are escaped in defineProperty calls.
Devtools now honors devtools.sessionId.
Re-exports of the same external binding are treated as one export.
Imported exports now honor externalLiveBindings.
A late payload no longer replaces newer module code.
Newly imported modules are shipped even if the client never received them.
Reloads the page when an HMR update fails after merging its edit.
Namespace properties are escaped in IIFE and UMD output.
Code splitting no longer moves init calls in front of unwrapped JSON modules.
Ships dependencies of a module that a patch shipped but never ran.
Chunk names are sanitized after resolving the relative path.
Generates valid bindings for shimmed exports.
HMR patches and lazy chunks now read string-named imports correctly.
HMR patches and lazy chunks now keep this undefined when calling an imported function.
The dev module factory is async when top-level await is used.
Bare external imports now retain their with clause.
Dependencies for import.meta.hot.accept are now aligned with Vite.
The resolver cache is cleared when a file is created or deleted.
Unresolved import diagnostics now name the resolved specifier.
The change that fetched a lazy route in one request was reverted.
Names are preserved through collapse_sourcemaps.
Metadata events are mapped by kind, and missing paths are treated as deleted.
Fixes initialization of leaves behind a re-exported namespace import during code-splitting.
Timing rows are labeled and distinguished by position, with group indexes included.
Deconflicts CommonJS locals that shadow a renamed require wrapper.
DevEngine::new now forces an incremental build.
The timing report clarifies callback owners.
Side effects propagate through cycles during tree-shaking.
The fallback records the WASI target.
Preserves annotation comments when output is minified.
Treats module-scope await using as top-level await.
Removes a deleted property from the output bundle proxy target.
Handles CommonJS exports accessed through top-level this.
Preserves plugin attribution in warnings produced while watching.
Cleans stale dynamic entry references after partial scans.
Includes external wildcard re-exports in OutputChunk.imports.
PreRenderedChunk.facadeModuleId is now nullable, matching Rollup.
An error now names the module when a codeSplitting group callback returns a value of the wrong type.
Import bindings are assigned before dependencies are initialized, fixing their ordering in development.
Development rename events are mapped like build watch rename events.
Star re-exports are copied before dependencies are initialized.
In-flight ensureLatestBuildOutput calls are resolved when the dev engine closes.
Hook types use BindingResult instead of the undeclared BindingErrorsOr.
Development registers an empty exports object for modules without exports.
Avoids emitting the ANSI erase-line escape in non-TTY output.
Excludes hash placeholders from case-insensitive filename deconfliction.
Renames nested require, __filename, and __dirname bindings in CJS output.
Flushes re-emitted assets when their content changes during development.
Preserves the Yarn PnP virtual importer during resolution.
Fixes an illegal instruction crash in the binding on Android arm64.
Devtools resolves log paths against the build working directory.
Negated sideEffects globs no longer retain modules.
A failed watch registration no longer aborts the batch.
Browser builds avoid using Node builtin modules.
cleanDir is forced off in dev mode.
External dynamic imports are included in chunk metadata.
Re-exported wrapped ESM modules are initialized at the entry chunk.
Proxy IDs are kept out of user resolveId hooks in dev mode.
The transformer gate skips newer syntax that oxc can lower.
CommonJS that fakes __esModule no longer leaves default undefined.
Re-exports from externals in dev are resolved through a real import.
File names are validated when emitFile is called.
Non-Node CommonJS output now emits an EMPTY_IMPORT_META warning.
The export name is preserved for export * as ns from in dev.
Filename-pattern diagnostics now use wording aligned with Rollup.
A ./foo/bar glob pattern is handled the same as foo/bar.
User plugin hooks are skipped for ?rolldown-lazy proxy modules in dev.
length() returns UTF-16 code units.
output.paths is applied to CommonJS export-star output for external modules.
Missing hook inputs are treated as non-matches instead of causing panics.
Emitted prebuilt-chunk file names are validated.
The resolveFileUrl hook is called in a deterministic order.
Callable builtin plugins now receive resolveId options.kind.
Tree-shaking an importing module no longer removes __toESM when it is needed.
Destructured dynamic import namespace bindings are tree-shaken.
For ESM output, the [format] placeholder in *FileNames options is es instead of esm.
The Vite import-glob plugin supports tsconfig paths with import.meta.glob.
Avoids an incorrect EMPTY_IMPORT_META warning for CJS output.
Rooted drive-less module IDs are treated as absolute when naming preserved modules.
Watch mode rebuilds when tsconfig files change.
A tsconfig change forces a full rebuild.
The binding is built for baseline x86-64 CPUs, improving compatibility on those systems.
Returns an empty object for modules mapped with browser: false.
Tree-shakes unused circular declarators exported via an export list.
Keeps deduplicated asset filenames stable once they can be observed.
Avoids panicking when an HMR rebuild encounters an unresolved import.
Resets word-boundary state on newline in Hires::Boundary sourcemaps.
Updates importer relationships of cached modules in incremental builds.
Improves warnings for invalid annotations.
Emits an async wrapper for top-level-await modules when onDemandWrapping is enabled.
Errors from the output.globals function are propagated.
Adds descriptive metadata to the plugin API.
Gates side effects of sideEffects:false modules on body demand.
Preserves sourcemap mappings for indented lines when a CJS module shares the chunk.
Hashes prepared sourcemap content.
Uses the public option name in sourcemap pattern errors.
Improves the error message for unresolved virtual imports.
Ignores watcher events after close.
Avoids a spurious leading newline in banner, footer, intro, and outro addon hooks.
Renames CJS-wrapped locals that shadow chunk-root bindings.
Deterministically keeps the shortest name for deduplicated assets.
Keeps an entry facade when a shared chunk contains another entry's module.
Handles bailout cases caused by JSON default mutation.
Avoids splitting a JSON default when the object escapes.
Serializes the KeepAssign unused minify option as keep_assign.
Preserves the export keyword on multi-declarator exports when keepNames is enabled.
Lazy barrel is disabled in dev mode.
Initialization errors in lazy-compiled modules can now be caught.
Keeps fragments after the newline fragment in last_line.
Preserves computed-key side effects on namespace member access during treeshaking.
Applies the annotation to cross-chunk namespace calls during treeshaking.
Generated output keeps the full JSON interface when using preserveModules.
Fixes undeclared JSON named exports in generated output when using preserveModules.
Validates replace plugin delimiter lengths instead of panicking.
Await inside a strict-mode function is no longer classified as top-level await.
The groups name function now receives plugin meta.
Fixed a crash on the browser main thread when using defer_drop.
Pending full reloads are canceled when a build errors.
Help output now displays options in camelCase.
The dev server now serves assets emitted during HMR or lazy compilation.
Used re-exports are preserved when preserveModules is enabled.
Closing the watcher is now reentrant in event callbacks.
External star re-exports now preserve their with clause.
The dev server now forces a rebuild after HMR errors.
JSON numbers outside the f64 range no longer cause a panic.
Locally used imports are loaded on a re-exported record.
Providing output.file without a file name no longer causes a panic.
compilerOptions.paths now resolve for importers whose non-TypeScript extension is explicitly listed in a tsconfig include glob.
Decorator transformation now infers strictNullChecks from the tsconfig.
chunk.imports is now ordered by execution order.
Fixes cross-chunk CJS wrappers shadowed by an author-local binding.
Lazy-barrel handling now requests all exports for entry barrels on first encounter.
HMR now reports the full-reload reason for the invalidate-loop case.
An explicit moduleSideEffects value from a hook now takes priority over package.json#sideEffects.
The resolver now honors package.json#type for .jsx and .tsx extensions.
The standalone runtime chunk keeps the rolldown-runtime name.
vite-resolve now preserves slash separators for Sass partial exports.
The finalizer skips init_*() for tree-shaken wrapped ESM owners.
The chunk optimizer now refuses asymmetric merges for cyclic dynamic entries.
Preserves
.defaultaccess on JSON default imports.Adds an
@__NO_SIDE_EFFECTS__hint for invalid@__PURE__annotations before function declarations.Handles slash-normalized IDs with
preserveModulesRoot.Reports
TSCONFIG_ERRORinstead ofUNHANDLEABLE_ERRORwhen a tsconfig file is missing.CommonJS default re-exports now use the export mode of the exporter chunk.
The optimization is skipped for write targets.
onOutput is no longer called twice when the initial build fails.
require() is routed to the CommonJS helper variant.
Decorator transformation now respects the strictNullChecks option.
Labels specified for dropping are applied before scanning.
A redundant initialization call is skipped when a barrel executes in the same chunk.
Chunk file names remain stable when an unrelated entry is added.
Names in codeSplitting.groups are called in deterministic order.
The absorbed dynamic-entry namespace is published across chunks.
Unsafe dynamic-only chunk merges are avoided.
resolve_id is idempotent when the resolved id is already a lazy entry.
Lazy modules added in rebuilds are watched.
Pure annotations propagate through compound expressions.
The watcher does not write output or emit events after close().
Wrapped ESM re-export owners are initialized.
Removes the severity prefix from diagnostic messages.
Enables enum_eval for transformSync and the Vite TypeScript transform.
Fixes exports of lazy requests in lazy chunks.
Uses loadExports for fetched proxies to preserve original export names.
Handles errors in the resolveSubpathImports callback.
HMR now applies __toCommonJS interop when a CommonJS module requires an ES module.
Lazily compiled modules are now watched, so changes to them can be detected during development.