What's Changed
🎉 See Announcing Rspack 2.2 for more details.
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
- feat: integrate module code generation to the new cache by @ahabhgk in #15194
- feat(cache): add fine-grained new cache options by @hardfist in #15261
- feat(ids): add compat-hashed module ids by @LingyuCoder in #14926
- feat: analyze dynamic imports in Promise.all destructuring by @JSerFeng in #15249
- feat: integrate new cache into source map devtool plugin by @ahabhgk in #15269
- feat(core): add compilation.runtimeTemplate by @kakiuwang-ui in #15305
- feat(ids): add compact chunk ids by @LingyuCoder in #14959
- feat(loader): support opt-in per-loader caching by @intellild in #15236
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
- perf(paths): intern ArcPath as a single-allocation prehashed path by @stormslowly in #15205
- perf: use rayon parallel scheduling for new cache db by @ahabhgk in #15251
- perf(core): skip the directory walk for glob patterns without metacharacters by @lazerg in #15297
- perf(split-chunks): skip single-chunk used exports grouping by @LingyuCoder in #15312
- perf(core): precompile filename templates cache by @intellild in #15195
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
- fix(css): CSS module dashed identifier and composes edge cases by @intellild in #15223
- fix: make Module.blocks and Module.dependencies fail gracefully while the module graph is under construction by @upupming in #15177
- fix: preserve reexport call context in concatenation by @LingyuCoder in #15247
- fix(cache): validate new cache version by @hardfist in #15237
- fix(cache): use storage location for new cache by @hardfist in #15250
- fix(ids): make compare_modules_by_pre_order_index_or_identifier a total order by @noyobo in #15260
- fix: await async modules in ProvidePlugin by @HashemKhalifa in #15143
- fix: refine binding code generation result error handling by @intellild in #15253
- fix(resolver): restore tsconfig files as file dependencies by @stormslowly in #15264
- fix: include factory-created server actions in RSC metadata by @nikhilsnayak in #15298
Refactor 🔨
- refactor(css): move css-module-lexer into workspace by @intellild in #15218
- refactor(core): clarify persistent cache item naming by @hardfist in #15231
- refactor(core): move factorization metadata into artifact by @hardfist in #15267
- refactor(core): use Arc for module graph dependencies by @hardfist in #15275
- refactor(paths): rename ArcPath to InternedPath by @stormslowly in #15274
- refactor(cache): align new cache snapshots with webpack by @hardfist in #15311
- refactor(cache): separate legacy cache implementation by @hardfist in #15316
- refactor: remove build_deps and parallel encoding by @ahabhgk in #15330
Document 📖
- docs: align stats JSON types with implementation by @chenjiahan in #15207
- docs: improve dynamic import magic comments by @SyMind in #15233
- docs: improve devtool configuration guide by @chenjiahan in #15239
- docs: expand devtool reference by @chenjiahan in #15241
- docs: improve target configuration guide by @chenjiahan in #15248
- docs: document compat-hashed module IDs for 2.2.0 by @chenjiahan in #15285
- docs: improve lazy compilation documentation by @chenjiahan in #15295
- docs: expand lazy compilation option reference by @chenjiahan in #15296
- docs: clarify resolve alias behavior by @chenjiahan in #15299
- docs: improve watch options documentation by @chenjiahan in #15303
- docs: clarify externals type defaults by @chenjiahan in #15304
- docs: remove outdated CodeSandbox example by @chenjiahan in #15317
- docs: document experiments.runtimeMode by @LingyuCoder in #15321
Other Changes
- refactor!(rsc): emit client references directly and preinit CSS by @SyMind in #14974
- chore: migrate rspack_resolver crate into the workspace by @stormslowly in #15161
- 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
- chore: bump SWC dependencies by @hardfist in #15217
- chore(vscode): use Rstack extension as default formatter by @chenjiahan in #15245
- chore: update Rstack to v0.6.2 by @chenjiahan in #15252
- ci: make sccache actually cache cargo check and clippy by @stormslowly in #15235
- chore: align agent guidance by @chenjiahan in #15268
- revert: remove faster module concatenation by @LingyuCoder in #15262
- chore(deps): update dependency @types/semver to ^7.8.0 by @renovate[bot] in #15283
- chore(deps): update dependency memfs to v4.68.1 by @renovate[bot] in #15284
- chore(deps): update patch npm dependencies by @renovate[bot] in #15281
- chore(deps): remove unused dependencies by @chenjiahan in #15286
- chore: remove unused files and exports by @chenjiahan in #15287
- chore(deps): update rust crate insta to 1.48.0 by @renovate[bot] in #15294
- chore(deps): update dependency connect-next to v5 by @renovate[bot] in #15291
- chore(deps): update dependency mermaid to ^11.17.0 by @renovate[bot] in #15290
- chore(deps): update rust crate either to 1.18.0 by @renovate[bot] in #15293
- chore(deps): update rust crate bitflags to 2.13.1 by @renovate[bot] in #15292
- chore(deps): update github-actions (major) by @renovate[bot] in #15301
- chore(deps): update rust crate cargo_toml to v1 by @renovate[bot] in #15213
- test(copy-plugin): cover brace expansion in glob patterns by @kakiuwang-ui in #15279
- chore(deps): upgrade Rstack CLI to v0.6.4 by @chenjiahan in #15329
New Contributors
- @doxxx93 made their first contribution in #15169
- @noyobo made their first contribution in #15260
- @kakiuwang-ui made their first contribution in #15279
- @nikhilsnayak made their first contribution in #15298
Full Changelog: v2.1.10...v2.2.0