Highlights
Here's a sneak peek at the exciting new features coming in Rspack 1.5.0.
Module Federation Module Hoisting
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
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
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
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
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
@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 tofalse
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 ⚡
- perf: align number hash algorithm with webpack by @nilptr in #10643
- perf: improve bundle splitting part 2 by @LingyuCoder in #11233
- perf: improve process runtime requirements by @LingyuCoder in #11259
- perf: improve process concatenated configurations by @LingyuCoder in #11264
- perf: improve
try_to_add
of module concatenation by @LingyuCoder in #11279 - perf: improve add concatenated modules by parallelizing conneciton modifications by @LingyuCoder in #11286
- perf: parallel mangle exports by @LingyuCoder in #10877
- perf: Update swc and switch to wasmtime by @quininer in #11303
- perf: cache concatenated imports by @LingyuCoder in #11334
New Features 🎉
- feat: add resolver JavaScript API by @CPunisher in #11211
- feat(wasm): support
@rspack/browser
by @CPunisher in #10870 - feat: lazy make for reexport in side effects free barrel file by @ahabhgk in #11117
- feat: support persistent cache for lazy barrel by @ahabhgk in #11285
- feat: rspack cli add config path to build dependencies by @jerrykingxyz in #11288
- feat: expose
experiments.swc
in parallel loader context by @jbroma in #11300 - feat: propagate const for inline const by @ahabhgk in #11311
- feat!: update minimum Node.js version to 18.12.0 by @chenjiahan in #11338
- feat: module chunk HMR by @stormslowly in #11160
- feat: move experiments.lazyCompilation to configuration toplevel by @GiveMe-A-Name in #11337
- feat: add VirtualModulesPlugin by @nilptr in #11021
Bug Fixes 🐞
- fix(types): change HotUpdateStatus from enum to union type by @chenjiahan in #11238
- fix: JsResolverFactory should cache Resolver instance based on different options by @SyMind in #11245
- fix: lifetime error by @LingyuCoder in #11260
- fix: avoid render weak import dependency by @ahabhgk in #11262
- fix: buildDependencies skip resolve nodejs builtin module by @jerrykingxyz in #11256
- fix: handle unwatch errors gracefully and improve native watcher integration by @GiveMe-A-Name in #11210
- fix: get resolve in externals should return query by @SyMind in #11276
- fix: CssGetFilenameRuntime should detect runtime requirements correctly by @JSerFeng in #11271
- fix: update lazy compilation middleware order to apply devServer Middleware by @GiveMe-A-Name in #11157
- fix: not changed related source-map when rename asset by @SyMind in #11293
- fix: swc transform api output sourcemaps by @jbroma in #11299
- fix: pass actual root context to parallel loader context by @jbroma in #11301
- fix: missing code generation report by @LingyuCoder in #11308
- fix: split chunks min chunks config with enforce by @SyMind in #11294
- fix: should not render export in modern-module when iife enabled by @Timeless0911 in #11317
- fix: export the missing
PathData
type by @colinaaa in #11315 - fix: rsdoctor multi compiler data scope by @LingyuCoder in #11310
- fix: batch rename_asset with parallel optimization by @SyMind in #11325
- fix: should synchronously bind html plugin hooks in sri plugin by @LingyuCoder in #11342
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
andasync_trait
from traitPlugin
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 📖
- docs: add docs for lazy barrel by @ahabhgk in #11274
- docs: add docs for custom binding crates by @h-a-n-a in #11290
- docs(rspress): upgrade to 2.0.0-beta.25 by @SoonIter in #11312
- docs: add Rslint to the list of Rstack tools by @chenjiahan in #11318
- docs: add version badges to Rstack tools table by @chenjiahan in #11321
- docs(quick-start): update runtime installation instructions by @chenjiahan in #11327
Other Changes
- chore: bump rust toolchain to
2025-07-28
by @h-a-n-a in #11217 - chore: release v1.4.11 by @GiveMe-A-Name in #11215
- chore(releasing): should not publish testing crates by @h-a-n-a in #11248
- chore: add crates.io badge by @h-a-n-a in #11250
- chore: upgrade rslint@0.1.0 by @hardfist in #11253
- chore: upgrade rslint to 0.1.1 by @hardfist in #11261
- chore: ignore moduleFederationDefaultRuntime.js in rslint by @stormslowly in #11269
- chore(wasm): release
@rspack/browser
by @CPunisher in #11254 - chore: supporting linux cache compressing with zstd by @stormslowly in #11270
- chore: upgrade rslint to 0.1.3 by @hardfist in #11267
- chore(deps): update github-actions by @renovate[bot] in #11295
- chore(deps): update napi by @renovate[bot] in #11296
- chore: deprecated
experiments.topLevelAwait
config by @stormslowly in #11284 - chore(deps): update dependency @playwright/test to v1.54.2 by @renovate[bot] in #11298
- chore: remove from
rspack_binding_api
in CODEOWNERS by @h-a-n-a in #11307 - chore: upgrade rslint@0.1.5 by @hardfist in #11316
- chore(ci): update test node matrix by @stormslowly in #10871
- chore(deps): update dependency prebundle to ^1.4.1 by @renovate[bot] in #11348
- chore(deps): update dependency memfs to v4.36.0 by @renovate[bot] in #11347
- chore(deps): update dependency typescript to ^5.9.2 by @renovate[bot] in #11323
- chore(ci): use npm trusted publish by @stormslowly in #11343
Full Changelog: v1.4.11...v1.5.0-beta.0