Highlights
Smaller bundles with improved code splitting
The new optimization.splitChunks.dedupDepth option lets Rspack spend more build time finding shared code and reducing duplication, giving you more control over the balance between bundle size and build time. In one application with many routes, this option reduced total output size by 9.9%.
It defaults to 1 in production and 0 in development. #15497
Build performance improvements
This release reduces repeated work and allocations during chunk graph construction and CSS Modules class name generation. JavaScript loaders also avoid copying their input content on each invocation, further reducing processing overhead.
- Optimize chunk graph construction: #15278, #15805.
- Reuse metadata and template values when generating CSS Modules class names: #15783, #15804.
- Avoid cloning JavaScript loader content: #15817.
What's Changed
New Features 🎉
- feat(split-chunks): add configurable dedupDepth by @JSerFeng in #15497
- feat: file system info path classification by @ahabhgk in #15752
- feat: support nested async dependency blocks by @intellild in #15741
- feat: cache context modules with filesystem snapshots by @ahabhgk in #15790
Performance 🚀
- perf: reduce build chunk graph overhead by @LingyuCoder in #15278
- perf(css): avoid rebuilding local ident metadata per class name by @LingyuCoder in #15783
- perf(resolver): memoize the interned package.json path by @LingyuCoder in #15797
- perf(css): cache invariant local ident rendering values by @intellild in #15804
- perf: store runtime keys as SmolStr by @intellild in #15807
- perf: reduce build chunk graph code splitter overhead by @LingyuCoder in #15805
- perf(css-extract): avoid per-loader configuration callbacks by @chenjiahan in #15812
- perf(loader): avoid cloning JS loader content by @SyMind in #15817
- perf(core): reuse module identifier for identical requests by @chenjiahan in #15820
- perf(loader): statically import worker_threads by @chenjiahan in #15825
- perf(core): reuse resource string for identical user requests by @chenjiahan in #15827
Bug Fixes 🐞
- fix: keep shadowing exports bindings in nested runtime deconfliction by @LingyuCoder in #15742
- fix(binding): release loader TSFNs on compiler close by @SyMind in #15735
- fix: render CommonJS externals directly in modern-module output by @JSerFeng in #15238
- fix: skip entry modules without JavaScript in the chunk startup by @cezaraugusto in #15767
- fix(html): keep the doctype when a comment is above it by @LingyuCoder in #15778
- fix(types): allow RslibPlugin without options by @chenjiahan in #15801
- fix: ignore fragment-only CSS URL dependencies by @intellild in #15800
- fix(bench): exclude compiler teardown from runtime requirements by @intellild in #15813
- fix(types): declare code generation Sources.get and migrate configs by @chenjiahan in #15814
- fix(types): allow RegExp resolve restrictions and migrate configs by @chenjiahan in #15819
- fix(cli): initialize profiling once for multiple configs by @chenjiahan in #15829
Document 📖
- docs: remove redundant CLAUDE.md setup tip by @chenjiahan in #15815
- docs: clarify default parallel loader worker count by @chenjiahan in #15824
Other Changes
- test: migrate inner-graph and HTTP test helpers to ESM by @chenjiahan in #15748
- test: migrate common test loaders to ESM by @chenjiahan in #15751
- ci: print ecosystem benchmark repository commit by @SyMind in #15746
- test: migrate test loaders, helpers and plugins to ESM by @chenjiahan in #15753
- test: migrate stateful and diagnostic loaders to ESM by @chenjiahan in #15758
- chore: add CLAUDE.md that imports AGENTS.md by @stormslowly in #15760
- test: support TypeScript case configurations by @chenjiahan in #15761
- chore(deps): upgrade Rstack to 0.7.6 and Rstest to 0.12 by @chenjiahan in #15762
- test: type-check case configs and migrate simple configs to TypeScript by @chenjiahan in #15765
- chore(deps): update dependency enhanced-resolve to v5.25.1 by @renovate[bot] in #15771
- test: migrate case configs to TypeScript (batch 1) by @chenjiahan in #15774
- test: migrate case configs to TypeScript (batch 2) by @chenjiahan in #15775
- test: migrate case configs to TypeScript (batch 3) by @chenjiahan in #15776
- test: migrate case configs to TypeScript (batch 4) by @chenjiahan in #15777
- chore(deps): update patch npm dependencies by @renovate[bot] in #15769
- chore(deps): update dependency jsdom to ^30.1.0 by @renovate[bot] in #15772
- test: migrate more case configs to TypeScript by @chenjiahan in #15787
- chore: remove redundant CLAUDE.md by @chenjiahan in #15791
- test: migrate 32 configs to TypeScript and normalize spacing by @chenjiahan in #15789
- chore(deps): upgrade lite-tapable to v1.2.0 by @chenjiahan in #15794
- test: migrate 77 configs and clean helpers to TypeScript by @chenjiahan in #15795
- test: migrate 61 configs and four helpers to TypeScript by @chenjiahan in #15803
- test: migrate more configs to TypeScript by @chenjiahan in #15806
- test: migrate more configs and helpers to TypeScript by @chenjiahan in #15811
Full Changelog: v2.2.6...v2.2.7