npm / @rolldown/browser
@rolldown/browser
What changed in @rolldown/browser 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
17 breaking1 security2 deprecations32 new APIs and options14 performance22 behavior and defaults6 tooling211 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@rolldown/browser 1305 changes
Breaking changes 17
The browser build now defaults cwd to
/.The CLI rejects --input when positional entries are also provided, matching Rollup.
Import attributes are modeled on import records and included in module identity, affecting how modules are distinguished.
Module namespace objects have a null prototype and are non-extensible.
Rejects non-ESM output formats in dev mode.
Watch reports only file events, so consumers no longer receive non-file events.
Namespace extraction is widened for already-loaded merges, changing code-splitting behavior.
The deprecated watch.notify option was removed.
Circular star reexports now resolve as null.
cleanDir is forced off in dev mode, so development runs no longer clean the directory.
length() now returns UTF-16 code units.
append and prepend now throw instead of panicking when an edit splits a chunk.
String id filters are rejected; the filter must be a RegExp.
For ESM format,
[format]in a*FileNamesoption now usesesinstead ofesm.Lazy barrel is disabled by default, so projects relying on it must enable it explicitly.
An invalid group test regex is surfaced as an error.
The defer keyword was dropped.
Security 1
Cleaning the output directory no longer follows directory symlinks.
Deprecations 2
The pluginTimings alias is deprecated in favor of checks.bundlerTimings.
Adds a MODULE_LEVEL_DIRECTIVE warning for module-level directives.
New APIs and options 32
Chunks using import.meta.ROLLDOWN_FILE_URL_* can be inlined.
Exposes the experimental import-attributes option and module ID helpers to JavaScript.
The load hook receives import attributes, and this.load accepts them.
Notify APIs are exposed.
The resolveId and resolveDynamicImport hooks receive import attributes.
this.resolve accepts import attributes.
The transform hook receives import attributes.
Adds isBundled to select the browser-external stub format.
Adds the output.charset option to configure output character encoding.
Adds an option for experimental dev-mode hot updates.
Ships imported bindings for HMR partial accept.
Adds experimental support for inlining common chunks containing import() and deduplicating shared code in lazy chunks.
Adds checks.bundlerTimings for bundler timing checks; pluginTimings remains as a deprecated alias.
Adds a dev option to gate the hotUpdate hook.
Module graph queries are exposed on the dev engine handle.
The transform option accepts a tsconfig path.
Adds armv7 Android support.
Adds a warning for conflicting star re-exports.
Adds an allocation-tracking global allocator behind the tracking_allocator feature.
The dev engine bindings now expose disableWatcher.
The dev engine supports the hotUpdate hook, allowing plugins to participate in hot updates.
Rolldown now supports the ROLLDOWN_FILE_URL import.meta property form.
This import.meta property form passes context to the resolveFileUrl hook.
Output-option callbacks are surfaced in PLUGIN_TIMINGS.
A resolveFileUrl plugin hook is now implemented for resolving emitted file URLs.
MagicString overwrite and update operations now support storeName.
Adds a
FILE_NOT_FOUNDerror.Adds the native config loader choice for the CLI.
Adds the sourcemapFileNames option for configuring source map filenames.
React Compiler options are exposed for Rolldown and Vite users.
The dev watcher supports an exclude option.
The dev watcher supports an include option.
Performance 14
Cycle checks for avoidRedundantChunkLoads are now incremental.
Importing rolldown no longer loads consola.
Deduplicates shared code along known loading paths, reducing duplicate code in inline common chunks.
In dev, ships only rows with dynamic edges in registerGraph.
Calls to sourcemapIgnoreList are batched.
Calls to sourcemapPathTransform are batched.
Fetches a lazy route in one request.
Caches getModuleInfo during code splitting.
Group test and name calls are batched for improved performance.
Finalization uses less memory.
Minified export names are built without allocating.
Chunks that never wrap no longer include the runtime import.
No-op init calls are dropped for empty wrapped-ESM modules.
Chunk optimization now deduplicates dynamic dependencies that are already loaded.
Behavior and default changes 22
CommonJS modules in Node ESM output now receive __dirname and __filename.
Import attributes are kept away from plugins unless the option is enabled.
A type import attribute takes precedence over moduleTypes in the asset and copy plugins.
This option is now supported in dev mode, allowing inline common chunks during development.
Top-level-await format errors now use this error for Rollup compatibility.
Expressions checking whether a key exists in a namespace import are folded when the namespace's exports are statically known.
Marks module starts with // <id> comments instead of #region pairs.
Routes independent ESM re-exports per consumer during code splitting.
Passes the watch exclusion setting to notify as its ignore filter.
addWatchFile now supports directories, allowing plugins to watch directory paths.
Minification now supports property name mangling.
Shared dependencies can be inlined in dynamic entries, giving developers another code-splitting outcome.
The dev server skips an HMR update when a module's rebuilt output is unchanged.
Treats bracket-notation
import.meta['ROLLUP_FILE_URL_*']as side-effect free.Rewrites
import.meta['url']and treats it as side-effect free.Treats
import.meta.ROLLUP_FILE_URL_*as side-effect free.Top-level import-binding reads are detected as execution-order sensitive, which can affect how modules are ordered.
Decorator transforms infer strictNullChecks from tsconfig.
PackageGraphReady now emits package size, making package size available to devtools consumers.
Invalid pure annotations now emit warnings.
The moduleParsed hook is now called in ParallelJsPlugin.
Rolldown now inlines optional-chain enum access.
Tooling 6
Development mode adds client-side HMR.
Devtools make duplicate packages discoverable.
Devtools can classify package dependency types.
Devtools can map packages to modules and chunks.
Devtools emit package metadata.
Devtools can mark packages that are used.
Fixes and other changes 211
A declaration keeps its name when it clashes with an external import.
Same-chunk dynamic imports are omitted from dynamicImports.
The CLI applies --environment before loading the binding.
Module names are escaped in generated error stubs.
Side effects are kept when a module's exported constant is inlined.
IIFE and UMD output skips namespace markers when the entry has no exports.
Sticky regexes match only at the start of the string.
Custom options are kept separate for overlapping this.resolve calls.
Statements made dead by imported constants are dropped before chunk linking.
Top-level this of a required module without module syntax is treated as its exports.
Code locations are included for issues at position 0.
Watch mode matches Rollup for BUNDLE_END output and multi-config watch options.
The option is respected for star re-exports from externals in CommonJS output.
JSON modules no longer shadow JSON.parse with named exports and preserve __proto__ as an own data property.
Native errors include id, plugin, and frame information.
Rewriting new URL() preserves its query and fragment.
Error and warning diagnostics respect NO_COLOR.
Non-JavaScript extensions are kept in the [name] placeholder.
Reference IDs are derived from stable seeds for deterministic builds.
sourcemap.toUrl works without Buffer.
An absorbed dynamic entry's namespace is rebuilt from the names its imports read.
Stable module IDs are hashed so chunk import map keys no longer depend on the build folder.
Chunk imports now retain their source order.
The runtime is hosted only in a chunk loaded by every consumer's entries.
Relative glob filters now treat cwd as a literal path.
Exported rest bindings from dynamic imports are now preserved during tree-shaking.
Emitted entries are handled like input entries when placing the runtime.
The wasm binding now follows directory symlinks when processing import-glob patterns.
Native runtime worker sizing now respects CPU limits.
Tsconfig settings are no longer applied when resolving imports from virtual modules.
The transform now reports tsconfigFilePaths when a tsconfig is resolved through TsconfigCache.
In dev mode, a wrapped module's initialization is no longer treated as a no-op.
Handles external require for the webworker SSR target.
Stops recursion between plugins when this.resolve is called with skipSelf: true.
Only wraps dynamic imports with static specifiers in __vitePreload.
Reports ASSIGN_TO_IMPORT when code writes to re-exported namespace members.
Makes repeated close() calls a no-op.
Prints a CommonJS module's top-level this as a wrapper parameter named by Rolldown.
Watches lazily compiled files even when a build starts first.
Keeps files loaded by the HMR stage watched when the same task rebuilds.
Handles output.charset set to 'ascii' when output.minify is false.
Keeps internal bindings out of entry exports.
Avoids assigning fixed names to bindings that would capture them.
Keeps an external require() local in a CJS module off the top-level names.
Avoids renaming entry top-level bindings onto their nested bindings.
Keeps generated top-level names off inner bindings.
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.
Preserves initialization of wrapped ESM re-exports during tree-shaking.
Tree-shakes expression statements that coerce known constants.
Uses computed access for arbitrary import names.
Fails on chunk syntax errors and escapes export names once.
Escapes dependency paths in CJS output.
Avoids cycles caused by redundant re-export initialization.
Escapes export names in defineProperty calls.
Devtools now honors the configured session ID.
Treats re-exports of the same external binding as one export.
Honors externalLiveBindings for imported exports.
Imported function calls in HMR patches keep
thisundefined, matching the expected call behavior.Prevents a late payload from replacing newer module code.
Reloads the page when an HMR update fails after merging its edit.
Ships newly imported modules that the client has not received.
Escapes namespace properties in IIFE output.
Avoids moving initialization calls in front of unwrapped JSON modules.
Ships dependencies of a module when a patch shipped that module but never ran.
Sanitizes preserveModules chunk names after resolving the relative path.
Each renderChunk call receives its own meta object.
Generates valid bindings for shimmed exports.
Reads string-named imports correctly in HMR patches and lazy chunks.
Makes the dev module factory async to support top-level await.
Escapes namespace properties and dependency paths in UMD output.
Keeps the
withclause on bare external imports.Re-derives chunk execution orders after the runtime leaves its host chunk.
Makes entries-aware chunk merging deterministic.
Aligns dependency handling with Vite.
Avoids restarting the macOS watcher for unchanged paths.
Gates member-read initialization paths on the reading statement.
Retains initialization paths through re-exported namespaces.
Clears the resolver cache when a file is created or deleted.
Names the resolved specifier in unresolved import diagnostics.
Names are preserved through sourcemap collapsing.
Metadata events are mapped by kind, and events for missing paths are treated as deletions.
Fixes initialization that left behind a re-exported namespace import.
Code-splitting timing rows are labeled, separated by group, and include group indexes so rows can be distinguished.
Fixes deconflicting CommonJS locals that shadow a renamed require wrapper.
Side effects now propagate through cycles during tree-shaking.
Preserves annotation comments when minifying.
Handles CommonJS exports accessed through top-level this.
Treats module-scope
await usingas top-level await.Preserves plugin attribution in watch-mode warnings.
Cleans stale dynamic entry references after partial scans.
Includes external wildcard re-exports in OutputChunk.imports.
PreRenderedChunk.facadeModuleId is now nullable, matching Rollup.
Hook types use BindingResult instead of the undeclared BindingErrorsOr type.
A module is named when a codeSplitting group callback returns a value of the wrong type.
Import bindings are assigned before dependencies are initialized.
Star re-exports are copied before dependencies are initialized.
Dev rename events are mapped like build watch events.
In-flight calls resolve when the dev engine closes.
Modules without exports now receive an empty exports object.
The Vite reporter avoids emitting ANSI erase-line escapes in non-TTY output.
Already-loaded side-effectful libraries are folded into eager entries during code splitting.
Hash placeholders are excluded from case-insensitive filename deconfliction.
Nested require, __filename and __dirname bindings are renamed in CJS output.
The dev server flushes re-emitted assets when their content changes.
Preserves the Yarn PnP virtual importer during Vite resolution.
Fixes an illegal instruction crash on Android arm64.
Devtools log paths are resolved against the build cwd.
Negated sideEffects globs no longer retain modules during code-splitting.
A failed watch registration no longer aborts the batch.
Chunk metadata now includes external dynamic imports.
The browser package avoids using Node builtin modules.
Re-exported wrapped ESM modules are initialized at the entry chunk.
User resolveId hooks no longer receive ?rolldown-lazy proxy ids.
The transformer gate skips newer syntax that oxc can lower.
The __toESM helper is retained when the importing module is tree-shaken.
Two-argument dynamic imports now point to the chunk that holds the module.
The metadata now matches the rewritten import() specifier.
Emitted file names are validated both when prebuilt chunks are emitted and at emitFile time.
Non-node CJS output now emits an EMPTY_IMPORT_META warning.
Optional properties now include undefined in their types.
The export name is preserved in dev builds.
The ./foo/bar glob pattern is now handled the same as foo/bar.
Sourcemaps are now generated for lazily compiled chunks.
A consumed MagicString instance can no longer be sent again or used after sendMagicString consumes it.
Invalid relocate ranges and non-contiguous moves are rejected before rewiring.
Edits that cancel out no longer report a change.
output.paths is now applied to CJS export-star output for external modules.
Calls to the resolveFileUrl hook now occur in a deterministic order.
Callable builtin plugins now receive resolveId options.kind.
User plugin hooks are skipped for ?rolldown-lazy proxy modules.
Avoids an incorrect
EMPTY_IMPORT_METAwarning forimport.meta.ROLLUP_FILE_URL_*in CJS output.The Vite import-glob plugin supports tsconfig paths with
import.meta.glob.Rooted drive-less module IDs are now treated as absolute when naming preserved modules.
Tree-shakes destructured dynamic import namespace bindings.
Changes to tsconfig files trigger watch rebuilds and full reloads in development.
Modules mapped with browser: false now resolve to an empty object in the Vite resolver plugin.
Unused circular declarators exported via an export list are tree-shaken.
Deduplicated asset filenames remain stable once they can be observed.
An HMR rebuild encountering an unresolved import no longer panics.
HMR falls back to a full reload when a changed module is not registered as executed.
Warnings for invalid annotations are improved.
TLA modules receive an async wrapper when onDemandWrapping is enabled.
Errors thrown by the output.globals function are propagated.
Side effects of sideEffects:false modules are gated on body demand.
Prepared sourcemap content is hashed.
Pattern errors use the public option name.
Errors for unresolved virtual imports now have improved messages.
Avoids a spurious leading newline in banner, footer, intro, and outro addon hooks.
Renames CJS-wrapped locals that shadow chunk-root bindings, avoiding name conflicts in generated output.
Deterministically keeps the shortest name for deduplicated assets.
Keeps an entry facade when a shared chunk contains another entry's module.
Lazy barrel is disabled in dev mode.
Handles JSON default mutation bailouts.
Avoids splitting a JSON default when its object escapes.
Preserves the export keyword on multi-declarator exports when keepNames is enabled.
Initialization errors in lazy-compiled modules are catchable.
Preserves computed-key side effects on namespace member access during tree shaking.
Applies the annotation to cross-chunk namespace calls during tree shaking.
Preserves the full JSON interface and avoids undeclared JSON named exports when generating with preserveModules.
Validates replace plugin delimiter lengths instead of panicking on invalid lengths.
Await inside a strict-mode function is no longer classified as top-level await.
The dev server now serves assets emitted during HMR or lazy compilation.
The code-splitting groups name function now receives plugin meta.
Fixed a crash that could block the browser main thread when using defer_drop.
Pending full reloads are canceled when a build fails.
CLI help options are now displayed in camelCase.
Corrected camel-case conversion for nested values.
Used re-exports are preserved when preserveModules is enabled.
Fixed handling of symlink files that Git for Windows treats as regular files.
Made close reentrant when called from event callbacks.
The dev server detects same-second rewrites in the CI poll watcher.
The dev server forces a rebuild after HMR errors.
Build errors are printed on browser refresh after a failed build.
ESM evaluation errors are cached.
Preserves the with clause when re-exporting from an external module.
Using output.file without a file name no longer causes a panic.
chunk.imports is now ordered by execution order.
Fixes a cross-chunk CJS wrapper being shadowed by an author-local binding.
Lazy-barrel handling 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_*() calls for tree-shaken wrapped ESM owners.
Added missing exports and ensured consistency with the rolldown package.
onOutput is no longer called twice when the initial build fails.
Decorator transforms now respect the strictNullChecks option.
Redundant init calls are skipped when the barrel executes in the same chunk.
Chunk file names remain stable when an unrelated entry is added.
CJS-wrapped locals that would shadow chunk-scope names are renamed.
Names in codeSplitting.groups are called in deterministic order.
The absorbed dynamic-entry namespace is published across chunks.
Unsafe dynamic-only merges are avoided.
Lazy modules added during rebuilds are watched.
Pure annotations propagate through compound expressions.
resolve_id is idempotent when the resolved id is already a lazy entry.
__toESM is no longer inherited across chunks for named-only external imports.
The watcher no longer writes output or emits events after close().
Owners of wrapped ESM re-exports are initialized.
Diagnostic messages no longer include a severity prefix.
enum_eval is now enabled for transformSync and Vite TypeScript transforms.
Fetched proxies use loadExports to preserve original export names.
Exports of lazy requests in lazy chunks are fixed.
Errors in the resolveSubpathImports callback are now handled.
The HMR finalizer now applies __toCommonJS interop when CJS requires ESM.
Lazily compiled modules are now watched in development.