v2.2.0
Added 10
- Implement generation-based memory cache eviction
- Add idle cache compaction with interruption handling
- Integrate module code generation to the new cache
- Add fine-grained new cache options
- Add compat-hashed module ids
- Analyze dynamic imports in Promise.all destructuring
- Integrate new cache into source map devtool plugin
- Add compilation.runtimeTemplate
- Add compact chunk ids
- Support opt-in per-loader caching
Changed 8
- Improve unicode handling and support more CSS modules cases, boost performance
- Cache converted module original source
- Batch splitChunks JavaScript callbacks
- Avoid parsing concatenated module codegen
- Preallocate identifier path buffers
- Intern ArcPath as a single-allocation prehashed path
- Use rayon parallel scheduling for new cache db
- Skip the directory walk for glob patterns without metacharacters
Fixed 2
- Pass HMR error to Preact refresh recovery handler
- Strip BOM from module content before concatenation in CSS extraction
From rspack
What's Changed
🎉 See Announcing Rspack 2.2 for more details.
New Features 🎉
- feat: implement generation-based memory cache eviction by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/15181
- feat: add idle cache compaction with interruption handling by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/15182
- feat(css): improve unicode handling and support more css modules cases, boost performance by @intellild in https://github.com/web-infra-dev/rspack/pull/14809
- feat: integrate module code generation to the new cache by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/15194
- feat(cache): add fine-grained new cache options by @hardfist in https://github.com/web-infra-dev/rspack/pull/15261
- feat(ids): add compat-hashed module ids by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/14926
- feat: analyze dynamic imports in Promise.all destructuring by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/15249
- feat: integrate new cache into source map devtool plugin by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/15269
- feat(core): add compilation.runtimeTemplate by @kakiuwang-ui in https://github.com/web-infra-dev/rspack/pull/15305
- feat(ids): add compact chunk ids by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/14959
- feat(loader): support opt-in per-loader caching by @intellild in https://github.com/web-infra-dev/rspack/pull/15236
Performance 🚀
- perf(binding): cache converted module original source by @SyMind in https://github.com/web-infra-dev/rspack/pull/15174
- perf: batch splitChunks JavaScript callbacks by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/15147
- perf(binding): exclude test loaders from release builds by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15209
- perf(binding): exclude perfetto from release WASI builds by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15221
- perf(binding): align release WASI optimizations by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15227
- perf(binding): optimize React Compiler crates for size by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15230
- perf: avoid parsing concatenated module codegen by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/14852
- perf: preallocate identifier path buffers by @intellild in https://github.com/web-infra-dev/rspack/pull/15220
- perf(paths): intern ArcPath as a single-allocation prehashed path by @stormslowly in https://github.com/web-infra-dev/rspack/pull/15205
- perf: use rayon parallel scheduling for new cache db by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/15251
- perf(core): skip the directory walk for glob patterns without metacharacters by @lazerg in https://github.com/web-infra-dev/rspack/pull/15297
- perf(split-chunks): skip single-chunk used exports grouping by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/15312
- perf(core): precompile filename templates cache by @intellild in https://github.com/web-infra-dev/rspack/pull/15195
Bug Fixes 🐞
- fix: pass HMR error to Preact refresh recovery handler by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15179
- fix(cache): limit shutdown compaction to a single pass by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/15188
- fix(types): add missing stats fields by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15206
- fix(css-extract): strip BOM from module content before concatenation by @doxxx93 in https://github.com/web-infra-dev/rspack/pull/15169
- fix(core): decouple incremental artifacts from cache! by @hardfist in https://github.com/web-infra-dev/rspack/pull/15229
- fix(asset): preserve ESM imports in module output for "preserve" importMode by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/15165
- fix(css): CSS module dashed identifier and composes edge cases by @intellild in https://github.com/web-infra-dev/rspack/pull/15223
- fix: make Module.blocks and Module.dependencies fail gracefully while the module graph is under construction by @upupming in https://github.com/web-infra-dev/rspack/pull/15177
- fix: preserve reexport call context in concatenation by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/15247
- fix(cache): validate new cache version by @hardfist in https://github.com/web-infra-dev/rspack/pull/15237
- fix(cache): use storage location for new cache by @hardfist in https://github.com/web-infra-dev/rspack/pull/15250
- fix(ids): make compare_modules_by_pre_order_index_or_identifier a total order by @noyobo in https://github.com/web-infra-dev/rspack/pull/15260
- fix: await async modules in ProvidePlugin by @HashemKhalifa in https://github.com/web-infra-dev/rspack/pull/15143
- fix: refine binding code generation result error handling by @intellild in https://github.com/web-infra-dev/rspack/pull/15253
- fix(resolver): restore tsconfig files as file dependencies by @stormslowly in https://github.com/web-infra-dev/rspack/pull/15264
- fix: include factory-created server actions in RSC metadata by @nikhilsnayak in https://github.com/web-infra-dev/rspack/pull/15298
Refactor 🔨
- refactor(css): move css-module-lexer into workspace by @intellild in https://github.com/web-infra-dev/rspack/pull/15218
- refactor(core): clarify persistent cache item naming by @hardfist in https://github.com/web-infra-dev/rspack/pull/15231
- refactor(core): move factorization metadata into artifact by @hardfist in https://github.com/web-infra-dev/rspack/pull/15267
- refactor(core): use Arc for module graph dependencies by @hardfist in https://github.com/web-infra-dev/rspack/pull/15275
- refactor(paths): rename ArcPath to InternedPath by @stormslowly in https://github.com/web-infra-dev/rspack/pull/15274
- refactor(cache): align new cache snapshots with webpack by @hardfist in https://github.com/web-infra-dev/rspack/pull/15311
- refactor(cache): separate legacy cache implementation by @hardfist in https://github.com/web-infra-dev/rspack/pull/15316
- refactor: remove build_deps and parallel encoding by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/15330
Document 📖
- docs: align stats JSON types with implementation by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15207
- docs: improve dynamic import magic comments by @SyMind in https://github.com/web-infra-dev/rspack/pull/15233
- docs: improve devtool configuration guide by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15239
- docs: expand devtool reference by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15241
- docs: improve target configuration guide by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15248
- docs: document compat-hashed module IDs for 2.2.0 by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15285
- docs: improve lazy compilation documentation by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15295
- docs: expand lazy compilation option reference by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15296
- docs: clarify resolve alias behavior by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15299
- docs: improve watch options documentation by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15303
- docs: clarify externals type defaults by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15304
- docs: remove outdated CodeSandbox example by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15317
- docs: document experiments.runtimeMode by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/15321
Other Changes
- refactor!(rsc): emit client references directly and preinit CSS by @SyMind in https://github.com/web-infra-dev/rspack/pull/14974
- chore: migrate rspack_resolver crate into the workspace by @stormslowly in https://github.com/web-infra-dev/rspack/pull/15161
- chore(deps): upgrade Rstack CLI to v0.6.0 by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15176
- chore(ci): use unified Rstack checks by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15184
- chore(resolver): tidy crate root layout by @stormslowly in https://github.com/web-infra-dev/rspack/pull/15180
- chore: format TOML with Rstack CLI by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15185
- chore(deps): upgrade pnp to 0.12.11 by @stormslowly in https://github.com/web-infra-dev/rspack/pull/15186
- chore(ci): gate binary size on main pushes by @stormslowly in https://github.com/web-infra-dev/rspack/pull/15178
- chore: upgrade Wasmtime and wasmparser dependencies by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/15187
- chore(deps): update patch npm dependencies by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15196
- chore(deps): update dependency toml to v5 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15204
- chore(deps): update rust crate regex to 1.13.1 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15200
- chore(deps): update dependency @shikijs/transformers to ^4.4.3 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15197
- chore(deps): update dependency terser to v5.50.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15198
- chore(deps): update dependency diff to v9 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15201
- chore(deps): update dependency glob to v13 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15202
- chore(deps): update dependency sass-loader to v17 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15203
- chore(deps): update dependency less to v4.9.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15210
- chore(deps): update rust crate anymap to 1.1.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15211
- chore: bump SWC dependencies by @hardfist in https://github.com/web-infra-dev/rspack/pull/15217
- chore(vscode): use Rstack extension as default formatter by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15245
- chore: update Rstack to v0.6.2 by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15252
- ci: make sccache actually cache cargo check and clippy by @stormslowly in https://github.com/web-infra-dev/rspack/pull/15235
- chore: align agent guidance by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15268
- revert: remove faster module concatenation by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/15262
- chore(deps): update dependency @types/semver to ^7.8.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15283
- chore(deps): update dependency memfs to v4.68.1 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15284
- chore(deps): update patch npm dependencies by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15281
- chore(deps): remove unused dependencies by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15286
- chore: remove unused files and exports by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15287
- chore(deps): update rust crate insta to 1.48.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15294
- chore(deps): update dependency connect-next to v5 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15291
- chore(deps): update dependency mermaid to ^11.17.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15290
- chore(deps): update rust crate either to 1.18.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15293
- chore(deps): update rust crate bitflags to 2.13.1 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15292
- chore(deps): update github-actions (major) by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15301
- chore(deps): update rust crate cargo_toml to v1 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15213
- test(copy-plugin): cover brace expansion in glob patterns by @kakiuwang-ui in https://github.com/web-infra-dev/rspack/pull/15279
- chore(deps): upgrade Rstack CLI to v0.6.4 by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15329
New Contributors
- @doxxx93 made their first contribution in https://github.com/web-infra-dev/rspack/pull/15169
- @noyobo made their first contribution in https://github.com/web-infra-dev/rspack/pull/15260
- @kakiuwang-ui made their first contribution in https://github.com/web-infra-dev/rspack/pull/15279
- @nikhilsnayak made their first contribution in https://github.com/web-infra-dev/rspack/pull/15298
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.1.10...v2.2.0