npm @rspack/cli 1.5.0-beta.0

latest releases: 1.5.2, 1.5.1, 1.5.0...
25 days ago

Highlights

Here's a sneak peek at the exciting new features coming in Rspack 1.5.0.

Module Federation Module Hoisting

#10524

This update introduces a runtime module that initializes federation during Rspack's runtime phase—similar to Webpack v1's Module Federation. The federation runtime is hoisted into runtime chunks, bypassing normal code-splitting rules, so it's eagerly available at startup.

Impact: In multi-entry applications using Module Federation, this can reduce bundle size by ~60%.

More details: https://gist.github.com/ScriptedAlchemy/a71ccbdfb933e8a4cd0131801a2c26b5#file-hoisted-runtime-internal-md

Rspack's Built-in Watcher

#10658

We've implemented a Rust-based file system watcher to improve performance in large-scale file change scenarios. Moving file watching into Rust also cuts down on overhead across the NAPI boundary.

Custom Native Binding

#10857

Want to build high-performance plugins for Rspack? This feature makes it easier. If writing a Rust plugin feels daunting, check out The Rspack Book—the first section covers customizing a Rspack binding step-by-step.

🎉 @rspack/browser

#10870

Yes, you can now run Rspack directly in the browser! We've even built a web REPL so you can try it instantly: repl.rspack.rs 🚀

Built-in Virtual Module Plugin

#11021

Thanks to @nilptr's contribution, Rspack now includes a built-in Virtual Modules plugin. If you work with a large number of virtual modules, this plugin helps Rspack maintain top performance even at scale.

Drop support for Node 16

#11338

@rspack/core v1.5 will no longer support Node 16, as Node.js reached end-of-life on September 11th, 2023. Many npm packages in the ecosystem have also dropped support for Node 16 (such as webpack-dev-server, css-loader, sass-loader, etc.), making it increasingly difficult to maintain compatibility.

Package v1.4 v1.5
@rspack/core >=16.0.0 >=18.12.0
@rspack/cli >=18.12.0 >=18.12.0
@rspack/dev-server >=18.12.0 >=18.12.0
@rsbuild/core >=16.10.0 >=18.12.0

Miscellaneous Updates

  • Stabilized LazyCompilation feature—experiments.lazyCompilation is now available at the top level of Rspack's config.
  • Deprecating experiments.topLevelAwait—setting it to false will now show a deprecation warning. This feature will be enabled by default and the config option removed in the next major release.

What's Changed

Performance Improvements ⚡

New Features 🎉

Bug Fixes 🐞

Refactor 🔨

  • refactor: remove features that are not supported in stable Rust by @h-a-n-a in #11243
  • refactor: move make dir by @jerrykingxyz in #11244
  • refactor: bench external getResolve & remove ResolveClosureContext by @SyMind in #11171
  • refactor: move builtin loader registration to plugin by @h-a-n-a in #11258
  • refactor: limit exported symbols in rspack_binding_api by @h-a-n-a in #11263
  • refactor: remove redundant PluginContext and async_trait from trait Plugin by @h-a-n-a in #11272
  • refactor: streamline native watcher path management and API design by @GiveMe-A-Name in #11282
  • refactor: remove __rust_probestack workaround by @h-a-n-a in #11326

Document Updates 📖

Other Changes

Full Changelog: v1.4.11...v1.5.0-beta.0

Don't miss a new cli release

NewReleases is sending notifications on new releases.