v2.2.0-beta.1
Pre-releaseHighlights
RSC: Client Component CSS now uses Flight preinit
Rspack now emits Client Component exports as registered client references directly. CSS imported by a Client Component is no longer injected by wrapping its exports with generated <link> elements; the stylesheet is preinitialized from the React Flight payload instead. This preserves client-reference identity, including default, named, CommonJS, and non-component exports. Explicit link generation remains available through import.meta.rspackRsc.loadCss().
This is a breaking change for RSC framework integrations. Upgrade react-server-dom-rspack to 0.1.0 and update any code that relies on the previous export-wrapper behavior.
SWC 77: Wasm plugins must be rebuilt
swc_core is upgraded from 76 to 77, which changes the serialized AST encoding across the SWC Wasm plugin boundary. Plugins compiled against an earlier SWC schema no longer load and the build fails with The version of the SWC Wasm plugin you're using might not be compatible with 'builtin:swc-loader'. Rebuild your plugin, or upgrade to an SWC 77 compatible release .
Use plugins.swc.rs to find the plugin version matching your Rspack release, and see SWC plugin version mismatch for details. SWC 77 also introduces dedicated FunctionBody and ArrowFunctionBody::FunctionBody AST nodes, a breaking change for Rust-side consumers of the SWC AST.
CSS Modules: standards-aligned Unicode identifiers
CSS identifier escaping and unescaping now follow the CSS Syntax standard, so Unicode identifiers are emitted directly instead of carrying unnecessary backslashes.
.😍 {
color: red;
}now generates .style_modules_css-😍 rather than .style_modules_css-\😍.
CSS Modules coverage also expands to more webpack cases — local/global modes, generator options, ICSS @value, custom identifiers, and warning order — and dependency collection moves into css-module-lexer, so stylesheets are no longer rescanned with regular expressions after parsing.
What's Changed
Breaking Changes 🍭
- refactor!(rsc): emit client references directly and preinit CSS by @SyMind in #14974
- chore: bump SWC dependencies by @hardfist in #15217
New Features 🎉
- feat: implement generation-based memory cache eviction by @ahabhgk in #15181
- feat: add idle cache compaction with interruption handling by @ahabhgk in #15182
- feat(css): improve unicode handling and support more css modules cases, boost performance by @intellild in #14809
Performance 🚀
- perf(binding): cache converted module original source by @SyMind in #15174
- perf: batch splitChunks JavaScript callbacks by @JSerFeng in #15147
- perf(binding): exclude test loaders from release builds by @chenjiahan in #15209
- perf(binding): exclude perfetto from release WASI builds by @chenjiahan in #15221
- perf(binding): align release WASI optimizations by @chenjiahan in #15227
- perf(binding): optimize React Compiler crates for size by @chenjiahan in #15230
- perf: avoid parsing concatenated module codegen by @LingyuCoder in #14852
- perf: preallocate identifier path buffers by @intellild in #15220
Bug Fixes 🐞
- fix: pass HMR error to Preact refresh recovery handler by @chenjiahan in #15179
- fix(cache): limit shutdown compaction to a single pass by @ahabhgk in #15188
- fix(types): add missing stats fields by @chenjiahan in #15206
- fix(css-extract): strip BOM from module content before concatenation by @doxxx93 in #15169
- fix(core): decouple incremental artifacts from cache! by @hardfist in #15229
- fix(asset): preserve ESM imports in module output for "preserve" importMode by @JSerFeng in #15165
Refactor 🔨
- refactor(css): move css-module-lexer into workspace by @intellild in #15218
- refactor(core): clarify persistent cache item naming by @hardfist in #15231
Document 📖
- docs: align stats JSON types with implementation by @chenjiahan in #15207
Other Changes
- chore: migrate rspack_resolver crate into the workspace by @stormslowly in #15161
- chore: release version 2.1.10 by @intellild in #15172
- chore(deps): upgrade Rstack CLI to v0.6.0 by @chenjiahan in #15176
- chore(ci): use unified Rstack checks by @chenjiahan in #15184
- chore(resolver): tidy crate root layout by @stormslowly in #15180
- chore: format TOML with Rstack CLI by @chenjiahan in #15185
- chore(deps): upgrade pnp to 0.12.11 by @stormslowly in #15186
- chore(ci): gate binary size on main pushes by @stormslowly in #15178
- chore: upgrade Wasmtime and wasmparser dependencies by @ahabhgk in #15187
- chore(deps): update patch npm dependencies by @renovate[bot] in #15196
- chore(deps): update dependency toml to v5 by @renovate[bot] in #15204
- chore(deps): update rust crate regex to 1.13.1 by @renovate[bot] in #15200
- chore(deps): update dependency @shikijs/transformers to ^4.4.3 by @renovate[bot] in #15197
- chore(deps): update dependency terser to v5.50.0 by @renovate[bot] in #15198
- chore(deps): update dependency diff to v9 by @renovate[bot] in #15201
- chore(deps): update dependency glob to v13 by @renovate[bot] in #15202
- chore(deps): update dependency sass-loader to v17 by @renovate[bot] in #15203
- chore(deps): update dependency less to v4.9.0 by @renovate[bot] in #15210
- chore(deps): update rust crate anymap to 1.1.0 by @renovate[bot] in #15211
New Contributors
Full Changelog: v2.1.10...v2.2.0-beta.1