Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

rolldown

rolldown33.2kMIT1.0.0-beta.3TypeScript support: included

Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.

webpack, parcel, esbuild, rollup, bundler, rolldown

readme

Rolldown logo

MIT licensed NPM version NPM Unpacked Size (with version) Build Status Code Coverage CodSpeed Badge Discord chat

NPM Unpacked Size darwin-arm64 NPM Unpacked Size darwin-x64 NPM Unpacked Size linux-x64-gnu NPM Unpacked Size win32-x64 NPM Unpacked Size wasm32-wasi

rolldown-starter-stackblitz

🚧 Work in Progress

Rolldown is currently in active development and not usable for production yet.

Rolldown

Rolldown is a JavaScript/TypeScript bundler written in Rust intended to serve as the future bundler used in Vite. It provides Rollup-compatible APIs and plugin interface, but will be more similar to esbuild in scope.

For more information, please check out the documentation at rolldown.rs.

VoidZero Inc.

Rolldown is a project of VoidZero, see our announcement Announcing VoidZero - Next Generation Toolchain for JavaScript.

If you have requirements for JavaScript tools at scale, please get in touch!

Contributing

We would love to have more contributors involved!

To get started, please read our Contributing Guide.

Credits

The Rolldown project is heavily inspired by:

And supported by:

  • napi-rs for Node.js add-ons in Rust via Node-API.
  • oxc for the underlying parser, resolver, and sourcemap support.

Licenses

This project is licensed under the MIT License.

This project also partially contains code derived or copied from the following projects:

Licenses of these projects are listed in THIRD-PARTY-LICENSE

changelog

1.0.0-beta.3 (2025-01-23)

Bug Fixes

  • dynamic tree shaking more await syntax (#3399) (f11bf03), closes #3396
  • force cjs wrapper to be included in the output (#3400) (8a5eba0)
  • should not set default value for treeshake in cli normalization (#3398) (72ddc66), closes #3392
  • shouldn't generate unused __toESM calls (#3401) (5deb279)
  • sort function panic due to user-provided comparison function does not correctly implement a total order (#3384) (4986046)

Features

1.0.0-beta.2 (2025-01-20)

Bug Fixes

Features

Performance Improvements

1.0.0-beta.1 (2024-12-25)

Bug Fixes

Features

Performance Improvements

  • remove extra allocation on MagicString#to_string (#3211) (98978bc)

0.15.1 (2024-12-18)

Bug Fixes

Features

Performance Improvements

0.15.0 (2024-12-02)

Bug Fixes

Features

Performance Improvements

0.14.0 (2024-11-05)

Bug Fixes

Features

Performance Improvements

  • plugin_replace: set more reasonable number for regex backtrack_limit (#2202) (3874566)
  • plugin/replace: expand_typeof_replacements avoid temporary vecs (#2321) (84cb2a2)
  • plugin/replace: expand_typeof_replacements use regex crate (#2320) (22b43cd)
  • replace plugin (#2356) (d3e9b9c)
  • rolldown_sourcemap: remove many unnecessary memory allocations (#2596) (12b112f)
  • rolldown: use SemanticBuilder::with_stats when running semantic analysis on same AST twice (#2230) (7220e80), closes #2227
  • union find path compression (#2399) (ea56d8d)

0.13.2 (2024-09-06)

Features

  • node/advance-chunks: support global fallback for minSize, minShareCount (#2178) (78c7750)
  • node/advance-chunks: support passing minSize, minShareCount (#2177) (3c95d30)
  • rust/advance-chunks: support min_share_count option (#2176) (689cbc2)
  • rust/advance-chunks: support min_size option (#2175) (1e9c2d9)

0.13.1 (2024-09-05)

Bug Fixes

Features

  • node/rolldown: support OutputOptions#advancedChunks (#2167) (851475d)
  • rust/advance-chunks: A module could be catched by multiple match groups (#2155) (071efd8)
  • rust/advance-chunks: rework with new API deisgn (#2146) (6339062)
  • rust/advance-chunks: should include matched module's dependencies too (#2161) (a557b51)
  • rust/advance-chunks: support test using regex (#2152) (b7b2ac5)

Performance Improvements

0.13.0 (2024-09-03)

Bug Fixes

Features

Performance Improvements

0.12.2 (2024-07-23)

Bug Fixes

Features

Performance Improvements

  • sourcemap: lookup original token in parallel (#1596) (e038205)

0.12.0 (2024-07-14)

Bug Fixes

Features

Performance Improvements

0.11.1 (2024-07-09)

Bug Fixes

  • treeshake.moduleSideEffects treeshake typing (#1559) (5ce9f67)
  • add dataurl in json config syntax. (#1536) (ddee952)
  • eliminate unused external module import stmt (#1558) (cdd83fd)
  • optional TransformResult#code (#1544) (15ce3ae)
  • sourcemap: avoid remapping if renderChunk hook not return map (#1545) (3e13785)

Features

0.11.0 (2024-07-05)

Bug Fixes

  • json: align the behavior of require json modules with nodejs (#1483) (8bf75ba)

Features

Performance Improvements

  • rolldown: avoid calling f64.to_string() (#1481) (f90969a)
  • rolldown: build oxc semantic data only once (#1506) (fa347b3)
  • rolldown: replace HASH_PLACEHOLDER_RE with simple string parsing (#1496) (aa347f5)
  • rolldown: use sort_unstable variants (#1469) (151d8c7)
  • rust/renamer: new deconflict strategy (#1461) (fa866eb)
  • rust: don't use regex on legitimize_identifier_name (#1477) (18bc668)
  • rust: reduce operations legitimize_identifier_name (#1478) (3d816d5)

0.10.5 (2024-06-27)

Bug Fixes

  • forbid_const_assign_when_lowering_using test (#1413) (0d15f0e)
  • cjs: handle export * from 'external' correctly (#1363) (9dbb803)
  • cjs: should not panic if wrapped esm module export * from 'external' (#1450) (c62a512)
  • core: don't panic on require calls that are invalid to bundler (#1445) (5fb31d0)
  • deps: update dependency @codemirror/view to v6.27.0 (#1347) (c6e1937)
  • deps: update dependency @rollup/plugin-commonjs to v26 (#1353) (7dbbfbc)
  • docs: update requirement of node version in contribution guide (#1345) (0d979b6)
  • export some typing (#1405) (c42f7b3)
  • option hook can be async and can return overwritten input options (#1422) (38a2c3e)
  • outputOptions hook argument should be OutputOptions (#1430) (472848b)
  • resolver: ensure we always pass an absolute path to oxc_resolver (#1442) (3ffe43f)
  • rolldown typing (#1387) (440e68e)
  • rolldown_fs: canonicalize polyfill on wasi platform (#1436) (2530866)

Features

0.10.4 (2024-06-04)

Bug Fixes

  • add return source logic when file not downloaded and add loader … (#1287) (103b8e5)
  • cjs: distinguish if symbols are referenced by chunk or modules (#1316) (75c69b3)
  • cjs: should render runtime module before generated imports (#1335) (94b1371)
  • deps: update dependency debug to v4.3.5 (#1296) (95460de)

Features

0.10.3 (2024-05-29)

Bug Fixes

  • cjs: only wrap entry cjs modules conditionally (#1164) (97d50b5)
  • cjs: should keep correct esm semantic in importing external modules (#1172) (4c6a63a)
  • cli: Improvements to more brandaly CLI (#754) (c07c3ed)
  • deps: update dependency @types/lodash to v4.17.3 (#1145) (52e733d)
  • deps: update dependency @types/lodash to v4.17.4 (#1147) (73e6d81)
  • deps: update dependency esbuild to ^0.21.0 (#1049) (5578516)
  • deps: update dependency esbuild to v0.21.1 (#1053) (562a7e2)
  • deps: update dependency esbuild to v0.21.3 (#1139) (68f44ff)
  • deps: update dependency execa to v9 (#1069) (6680a14)
  • deps: update dependency execa to v9.0.2 (#1078) (db1be3d)
  • deps: update dependency execa to v9.1.0 (#1110) (c2b6818)
  • deps: update dependency vue to v3.4.27 (#1048) (cf87c5d)
  • deps: update dependency zod to v3.23.8 (#1068) (7fef82c)
  • deps: update dependency zx to v8.1.0 (#1120) (7558600)
  • deps: update dependency zx to v8.1.2 (#1255) (4ab44ed)
  • deps: update minor dependencies (#1257) (00564af)
  • deps: update patch dependencies (#1060) (8a24ba9)
  • deps: update patch dependencies (#1073) (ec7ae9a)
  • deps: update patch dependencies (#1104) (cdd981e)
  • deps: update patch dependencies (#1215) (6022624)
  • deps: update patch dependencies (#1246) (f4bd84f)
  • doc: correct link and fileName in documentation (#1241) (afd37ef)
  • ensure chunk order (#1135) (975e884)
  • esbuild case test_common_js_variable_in_esm_type_module (#1183) (f11a717)
  • generateBundle and writeBundle compat to rollup (#966) (4a45b2d)
  • node/cli: exit process after bundling (#1097) (9a91687), closes #985
  • node/rolldown: CIRCULAR_DEPENDENCY warnings. (#1232) (56320ab)
  • node: should call hooks with await (#950) (1c5c7d5)
  • normalize windows path for sourcemap sources (#941) (bf9bbe1)
  • resolve: care about browser field while targeting browser platform (#1075) (936a6ab)
  • resolve: treat builtin modules as external by default while targeting node platform (#1190) (8d088d8)
  • rewrite dynamic import to correct entry chunk (#1195) (d242f3e)
  • rolldown/hash: caculate hash by scanning actually used dependencies and also prevent hash collision from different chunks that have the same content (#1141) (130013b)
  • rust/resolve: should point to the correct resolved external module with alias (#1253) (4667d32)
  • rust: cacluate order of import chunks by global module execution order (#1206) (c9acb39)
  • rust: remove not existed member method (3134b77)
  • should generate correct chunk import path to importee in importer chunk (#1180) (8190a5c)
  • test_package_json_browser_no_ext (#1093) (82e77a1)
  • test_package_json_browser_over_main_node (#1107) (e863b43)
  • test_package_json_type_should_be_types (#1184) (63384bd)
  • tree_shaking: determine indirect side effects (#1213) (1003174)
  • tree-shaking: module should consider having side effect if it's dependencies have side effect (#1205) (b235a38)
  • typo (#1175) (6b0bbe7)
  • using path as sourcemap path (#946) (bc0934b)

Features

Performance Improvements

  • rolldown: avoid spurious allocations when prettifying paths (#945) (4f8d101)

0.10.2 (2024-04-17)

Bug Fixes

  • buildEnd hook handle error (#902) (bc8e9ab)
  • ci: cargo bench should install critcmp (#899) (0169bfe)
  • normalize original sourcemap sources (#765) (679a9ac)
  • passing BindingResolveOptions#alias from js to rust with maintaining order (#798) (2f3d865)
  • remapping sourcemap from transform hook (#755) (43242f4)
  • rust/resolver: use selected resolver instead of the default one (#780) (226df5b)
  • sourcemap sources path relative to output file dirname (#758) (7f5047f)

Features

  • add InputOptions#platform (#751) (97ea4b6)
  • Allow pass tsconfig to oxc-resolver via InputOptions#resolve#tsconfigFilename (#767) (c304a0d)
  • emit warning for circular dependency (#839) (6d64a64)
  • improve side effect detector (#807) (b948cf6)
  • node/plugin: support renderStart hook (#833) (c1194e6)
  • rolldown: introduce rolldown_rayon (#846) (4f9ae49)
  • rolldown: support compile to wasi (#467) (da45d40)
  • rust: only derive deserialize on BundlerOptions in testing (#880) (06df20d)
  • rust: collect circular dependencies while sorting modules (#830) (c092e0b)
  • rust: improve alignment of resolve behaviors with esbuild (#759) (e9d7717)
  • support entryFileNames and chunkFileNames (#777) (50da487)
  • support InputOptions#shimMissingExports (#772) (2c84963)
  • support renderError hook (#900) (b9c9181)
  • support disable warnings using InputOptions#logLevel (#859) (f90bbb0)
  • support render chunk hook normalzied output options (#795) (709aca7)
  • support return sourcemap in render chunk hook (#776) (0d4c2d5)
  • support running Js plugin in parallel via Worker (#825) (cff55de)
  • tree_shaking: shake unused import variables (#771) (6714dd0)

Performance Improvements

  • avoid unnecessary clone in AddonFunction (#822) (f814c3e)
  • rolldown: use starts_with instead of regex in resolve (#878) (93dc6ce)
  • sourcemap: search lines count at parallel (#806) (267fc2a)

0.10.1 (2024-04-03)

Bug Fixes

  • rolldown node api should create graph (#302) (c7749ba)
  • A Symbol should only be declared in one chunk (#338) (340cd27)
  • add identifier for export default function without identifer (#81) (e84cde7)
  • add stmt info declare symbol for resolution found symbol (#91) (50e191a)
  • align with rollup, change output.format: 'esm' to output.format: 'es' (#625) (70b6cfd)
  • allow cjs to be both entry and dependency (#336) (d53155b)
  • async_scope_block_on (#210) (51f1be1)
  • bench/ci: use correctly github repo token (049566e)
  • binding: only panic in the main thread (#507) (d844125)
  • build script pkgName parsing error (#546) (0d6582f)
  • bump to `oxc@0.7` (1af4b86)
  • ci release (#428) (483e533)
  • ci: don't forget to checkout (fc231b8)
  • ci: fix release-canary.yml (6fc0430)
  • ci: fix testing in release.yml (#651) (6e68b1a)
  • ci: need to checkout for using local actions (bb87f9a)
  • clean up render exports from external module (#394) (e51a69a)
  • cli: Make the CLI output color correctly (#645) (c19c8dc)
  • cli: normalize provided config path to satisfy esm-loader in windows (#658) (be0540d)
  • clippy (#4) (f028cff)
  • conflict between imported and local binding (#356) (7387e35), closes #355
  • correct id in transform hook (#473) (7af0262)
  • correct the TS type of the banner ts-binding (#689) (a072a00)
  • deconflict export named declartion (#386) (21aaa36)
  • deconflict for duplicate canonical names (#365) (eebea46), closes #364
  • defonflict export default function (#385) (518aa5f)
  • determine call expression result is used to render require call (#144) (85224ea)
  • don't rename symbols that show many times. Fixes #419 (f985755)
  • duplicate dynamic entries (#380) (6067e74)
  • dynamic import as entry (#366) (8d33829)
  • dynamic import chunk is_entry should be false (#361) (6f2b75a)
  • ensure valid output for import the same cjs twice (#323) (87b5000)
  • expect msg (#456) (11e5598)
  • export rolldown compat types (#337) (3efa4fd)
  • fix typo in README.md (#443) (8ad8174)
  • generate local symbol for esm import cjs instead of reference cjs namespace symbol (#141) (5c53415)
  • hoist statements. Fixes #418 (276bbae)
  • hoisted import declaration (#80) (569409d)
  • hoisted top level scope declartion for wrapped esm (#387) (ec20c03)
  • invalid output for conflict global and local name (#359) (d464eee)
  • keep the context of function call while deconflict symbols (7401a05)
  • make sure namespace name is valid identifier (#107) (d3c81aa)
  • module execute order (#148) (7ef1c20)
  • more meaningful chunk filename (#381) (47b4b6d), closes #49
  • node-bench: apply @rollup/plugin-commonjs on rollup (#523) (181422a)
  • node/types: resolve.alias should be optional (ee10a4f)
  • only import needed runtime symbols (#324) (51db31f), closes /github.com/rolldown-rs/rolldown/pull/319#discussion_r1398069930
  • only pull out __export() when it's needed (670dbb6)
  • packages/core: allow empty OutputOptions.format (#224) (0a79036)
  • packages/core: make outputOptions optional (#223) (b2439b1)
  • playground panic (#263) (f97bea0)
  • reexport star from local named export (#290) (77c77ec)
  • release: make prepare-publish-node folder (14d2cd5)
  • release: remove build steps for android platform (161ef5f)
  • rename in SimpleAssignmentTarget (1d24efc)
  • rewrite AssignmentTargetProperty (5605fc2)
  • rewrite object shorthand property reference (#384) (9f3332b)
  • rewrite unresolved symbol reference callee to indirect call (#94) (6284028)
  • rolldown example root is empty in debug mode (#582) (88f61e8)
  • runtime module should always be the first to be executed (#116) (883168f)
  • rust: fix bench for react by removing a lot of unsafe (#522) (71da395)
  • rust: remove RUNTIME_PATH (#274) (c93a2fb)
  • rust: should not hard code output.dir (37ded97)
  • shoud accept args for just bump packages (778ae11)
  • should correctly render export default xxx (#377) (7fa642f)
  • should rewrite export default import(...) correctly (#220) (cd8ad5e)
  • stable generated exports (#313) (526a04b)
  • support browser filed false value (#395) (c3a82a4)
  • top level await fix compile error (#226) (ac60fdf)
  • treeshaking: spreading an expression is consider having side effect (#509) (d094d56)
  • typo in README.md (#458) (24a4018)
  • use the same Resolver everywhere (#253) (cbcee58)
  • using vec to keep input options order (#217) (4e4f20a)
  • warpped require module (#79) (ee9a682)
  • wrong rolldown test config priority (#642) (9490e31)

Features

Performance Improvements

Reverts

  • Revert "refactor: implement ConcatSource (#611)" (#612) (dc32a76), closes #611 #612
  • Revert "perf: reduce Module size (#6)" (#7) (711ddb0), closes #6 #7

0.10.0 (2024-03-26)

Bug Fixes

Features

Performance Improvements

Reverts

  • Revert "refactor: implement ConcatSource (#611)" (#612) (dc32a76), closes #611 #612
  • Revert "perf: reduce Module size (#6)" (#7) (711ddb0), closes #6 #7