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

latest releases: 1.0.0-rc.16, 1.0.0-rc.15, 1.0.0-rc.14...
3 months ago

[1.0.0-beta.59] - 2026-01-07

⚡ Inline Dynamic Imports for Statically Imported Modules

  • When a module is already statically imported, dynamic imports to that same module are now inlined instead of creating a separate chunk
  • REPL: before and after

Before:

import { foo } from './foo.js'
console.log(foo)

import('./foo.js').then(mod => console.log(mod.foo))

Previously, import('./foo.js') would create a separate async chunk.

After:

var foo_exports = /* @__PURE__ */ __exportAll({ foo: () => foo });
const foo = "foo";
console.log(foo);
Promise.resolve().then(() => foo_exports).then((mod) => console.log(mod.foo));

The dynamic import is inlined since foo.js is already statically imported.

🚀 Features

  • plugin_timings: add 3s threshold and doc link to warning message (#7741) by @shulaoda
  • improve treeshaking logic to handle empty parameter list in dynamic import .then() callbacks (#7781) by @Copilot
  • dev/lazy: don't include already executed modules (#7745) by @hyf0
  • dev/lazy: support dynamic import(..) (#7726) by @hyf0
  • inline dynamic imports that imports statically imported modules (#7742) by @IWANABETHATGUY
  • option: add experimental option to control chunk optimization (#7738) by @IWANABETHATGUY

🐛 Bug Fixes

🚜 Refactor

📚 Documentation

  • add rolldown-string reference to native MagicString compatibility section (#7778) by @Copilot
  • improve comments for export star side effects handling (#7730) by @IWANABETHATGUY

🧪 Testing

⚙️ Miscellaneous Tasks

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

Don't miss a new rolldown release

NewReleases is sending notifications on new releases.