Important Changes
New Features
- Support for
OutputOptions.file
has been added. - Treeshaking is now available for dynamic
import(...)
. - Legal comments can be preserved using
OutputOptions#comments: 'preserve-legal'
. - A new
build
API has been introduced for more user-friendly programmatic usage.
// Instead of
(await (await rolldown(options)).write(options.output))
// Use `build`
await build(options)
UX Improvements
- The platform is automatically set to
node
when the outputformat
iscjs
, if not specified. - Automatic polyfill for
require
is provided when bundling code that mixes ESM and CJS toformat: 'esm'
withplatform: 'node'
. - Automatic polyfill for
import.meta.url
is provided when bundling ESM code toformat: 'cjs'
withplatform: 'node'
.
Correctness
- To improve interoperability between ESM and CJS, Rolldown passes all tests listed in bundler-esm-cjs-tests.
esbuild: ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ rolldown: ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ node: ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ 🚫🚫 ✅✅ 🚫🚫 🚫🚫 🚫🚫 🚫🚫 🚫🚫 ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ 🚫🚫 ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ webpack: 🚫🚫 🚫🚫 ✅🚫 🚫🚫 🚫🚫 ✅🚫 🚫🚫 ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ 🚫🚫 🚫🚫 🚫🚫 ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ 🚫🚫 ✅✅ ✅✅ ✅✅ ✅✅ parcel: ✅✅ ✅✅ 🚫🚫 🚫🚫 🚫🚫 🚫🚫 🚫🚫 ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ 🚫🚫 🚫🚫 🚫🚫 ✅✅ 🚫🚫 🚫🚫 🚫🚫 🚫🚫 ✅✅ 🚫🚫 🚫🚫 🚫🚫 ✅✅ ✅✅ ✅✅ ✅✅ rollup: 🚫🚫 🚫🚫 ✅✅ 🚫✅ ✅✅ ✅✅ 🚫🚫 🚫🚫 🚫🚫 🚫🚫 ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ ✅✅ 🚫🚫 ✅✅ ✅✅ 🚫🚫 ✅✅ ✅✅ ✅✅ 🚫🚫 🚫🚫 🚫🚫 🚫🚫 🚫🚫 🚫🚫 🚫🚫 🚫🚫 ✅✅
For more details, see ref.
- Rolldown promises to run successfully on all LTS Node.js versions. Our full test suites are enabled on Node.js versions 18, 20, and 22.
- Fresh self-bootstrapping for every commit: Rolldown now rebuilds itself with the code in each commit and runs all tests to ensure correctness.
More changes
Please refer to https://github.com/rolldown/rolldown/blob/main/CHANGELOG.md.
New Contributors
- @thesmartwon made their first contribution in #2636
- @eolme made their first contribution in #2732
- @gautemo made their first contribution in #2809
Full Changelog: v0.14.0...v0.15.0