npm rolldown 1.0.0-beta.44
v1.0.0-beta.44

latest releases: 1.0.0-rc.9, 1.0.0-rc.8, 1.0.0-rc.7...
4 months ago

[1.0.0-beta.44] - 2025-10-20

๐Ÿ’ฅ Breaking Changes

  • Top-level jsx removed, use transform.jsx instead
  • output.minifyInternalExports now enabled by default

๐ŸŽฏ Enhanced Tree-Shaking

  • JSON default imports are now tree-shakeable
// config.json
{
"apiUrl": "[https://api.example.com](https://api.example.com/)",
"timeout": 5000,
"retries": 3,
"debug": false
}

// main.js
// Before: Entire JSON was included in bundle
import config from './config.json';
console.log(config.apiUrl);

// After: Only the used property is included
// Bundle now contains just the apiUrl value
  • Built-in typed array constructors (new Uint8Array(), new Int32Array(), etc.) marked as pure

โš™๏ธ Configuration Improvements

  • Support output.cleanDir option
  • Deprecated some top-level options
    • define โ†’ transform.define
    • inject โ†’ transform.inject
    • dropLabels โ†’ transform.dropLabels
    • keepNames โ†’ output.keepNames
    • profilerNames โ†’ output.generatedCode.profilerNames

๐Ÿ’ฅ BREAKING CHANGES

  • enable output.minifyInternalExports for format: 'es' or minify: true (#6594) by @sapphi-red
  • node/options: remove InputOptions.jsx, prefer transform.jsx always (#6548) by @hyf0

๐Ÿš€ Features

  • support jsx preset for transform.jsx (#6630) by @shulaoda
  • rolldown_plugin_vite_html: align inject_to_body function (#6622) by @shulaoda
  • rolldown_vite_css_post_plugin: tweak is_legacy field (#6620) by @shulaoda
  • native-plugin: expose viteHtmlPlugin (#6609) by @shulaoda
  • native-plugin: expose viteCSSPostPlugin (#6606) by @shulaoda
  • builtin-plugin: expose viteCSSPlugin (#6605) by @shulaoda
  • rolldown_plugin_vite_html: complete plugin binding (#6604) by @shulaoda
  • rolldown_plugin_vite_css: support plugin binding (#6598) by @shulaoda
  • add TypedArray constructors to side-effect free globals (#6592) by @IWANABETHATGUY
  • rolldown_plugin_vite_html: align process src attr logic (#6572) by @shulaoda
  • rolldown: support output.clearDir to clean up dir before build (#6486) by @aprosail
  • dev: return RolldownOutput instead of BindingOutputs from onOutput (#6563) by @sapphi-red
  • rolldown_plugin_vite_html: align process srcset logic (#6560) by @shulaoda
  • rolldown_plugin_vite_html: align process src function (#6559) by @shulaoda
  • rolldown_plugin_vite_html: align parse secset function (#6558) by @shulaoda
  • node/options: deprecate dropLabels and add transform.dropLabels (#6557) by @hyf0
  • node/options: deprecate keepNames and add output.keepNames (#6556) by @hyf0
  • node/options: deprecate profilerNames and add output.generatedCode.profilerNames (#6555) by @hyf0
  • node/options: deprecate top level inject and define and add transform.define, transform.inject (#6544) by @hyf0
  • rolldown_plugin_vite_html: initialize attributes handle logic (#6543) by @shulaoda
  • rolldown: oxc v0.95.0 (#6541) by @Boshen
  • rolldown_plugin_vite_html: align inject css logic (#6528) by @shulaoda
  • rolldown_plugin_vite_html: align modulepreload inject logic (#6526) by @shulaoda
  • rolldown_plugin_vite_html: align css bundle output inject logic (#6524) by @shulaoda
  • rolldown_plugin_vite_html: support inject_to_head function (#6522) by @shulaoda
  • rolldown_plugin_vite_html: align emit and delete logic (#6521) by @shulaoda
  • rolldown_vite_html: align handle html asset url logic (#6518) by @shulaoda
  • add an example how to transform code and generate sourcemap with experimental.nativeMagicString (#6514) by @IWANABETHATGUY
  • rolldown_plugin_vite_html: align handle inline css logic (#6517) by @shulaoda

๐Ÿ› Bug Fixes

  • native-plugin: use correct config for assetPlugin (#6638) by @shulaoda
  • no_color not being respected on reporter (#6615) by @H4ad
  • improve tree shaking for JSON default imports (#6626) by @IWANABETHATGUY
  • cjs treeshaking removes used code (#6597) by @IWANABETHATGUY
  • plugin/vite-resolve: return package_json_path from resolveId hook (#6434) by @sapphi-red
  • dev: should have idx error happens with deferSyncScanData + incremental rebuild (#6568) by @sapphi-red
  • rolldown: sync scoping properly in pre_process_ecma_ast (#6537) by @Boshen
  • process CJS tree shaking bailout modules before eliminating unused dynamic entries (#6549) by @IWANABETHATGUY
  • rust/dev: error of bundler.scandoesn't get handled (#6547) by @Copilot
  • inline only self referenced json module properties (#6519) by @IWANABETHATGUY
  • avoid processing native MagicString sourcemap when sourcemap is disabled (#6510) by @IWANABETHATGUY

๐Ÿšœ Refactor

  • rolldown_binding: unify BindingAssetInlineLimit (#6625) by @shulaoda
  • rolldown_binding: tweak BindingAssetPluginConfig (#6624) by @shulaoda
  • tweak viteCSSPlugin config (#6610) by @shulaoda
  • rust/dev: remove unnecessary bundler cache management of dev engine (#6576) by @hyf0
  • rust/dev: refactor TaskInput into enum to reduce invalid states (#6575) by @hyf0
  • improve the error message of ScanStageCache#merge (#6564) by @IWANABETHATGUY
  • rust/dev: use client_id to check if module is executed for test environment (#6566) by @hyf0
  • rust/binding: mark napi object that won't be received from js side (#6531) by @hyf0
  • rust/binding: mark napi object struct that won't be passed to js explicitly (#6525) by @hyf0
  • rust/binding: use &str or JsString to avoid unnecessary clone (#6523) by @hyf0
  • rust/binding: use &str to avoid unnecessary clone (#6520) by @hyf0
  • rust: replace unwrap with expect for better error handling in message sending (#6509) by @hyf0

๐Ÿ“š Documentation

โšก Performance

๐Ÿงช Testing

โš™๏ธ Miscellaneous Tasks

โค๏ธ New Contributors

Co-authored-by: shulaoda 165626830+shulaoda@users.noreply.github.com

Don't miss a new rolldown release

NewReleases is sending notifications on new releases.