Highlights
Faster stats.toJson() for large builds
Rspack now generates default Stats JSON through a faster path and uses compact tables for module and dependency-reason data. In one anonymized production client build, the reason-data change reduced the median time of the first stats.toJson() call from 7.30 s to 2.75 s. #16906 · #16952 · #16976
Less overhead for parallel loaders
Rspack now reuses parsed loader requests within a compilation and cuts worker round trips for dependency updates, logging, and diagnostics. #16901 · #16933 · #16934 · #16936
More reliable HMR with lazy compilation
Rspack now keeps compact-hashed chunk IDs stable across rebuilds and handles reused chunk IDs during hot updates. This fixes crashes that could occur when lazy compilation activates a chunk in a build that uses workers. #16877 · #16884
What's Changed
New Features 🎉
- feat(javascript): highlight code in dynamic import warnings by @chenjiahan in #16850
- feat(core): highlight suggested paths in module resolution errors by @chenjiahan in #16854
- feat(javascript): clarify DefinePlugin conflict warnings by @chenjiahan in #16855
- feat: normalize source map template path separators by @SyMind in #16717
- feat(hash): implement RspackHash for HashMap, HashSet, and InternedPath by @intellild in #16888
- feat(watcher): introduce DirectoryWatcher model and WatcherManager ownership routing by @stormslowly in #16935
Performance 🚀
- perf(runtime): emit template literals for chunk filenames by @hai-x in #16831
- perf(loader): skip waiting on an empty dependency queue by @chenjiahan in #16881
- perf(loader): create the sync response channel on demand by @chenjiahan in #16887
- perf(loader): create dependency state on demand by @chenjiahan in #16894
- perf(loader): cache parsed loader requests per compilation by @chenjiahan in #16901
- perf: collapse adjacent
**segments in the glob check by @hai-x in #16903 - perf(stats): fast-path default stats JSON by @SyMind in #16906
- perf(sources): share source map text in persistent cache by @SyMind in #16912
- perf(loader): skip success replies for parallel dependency updates by @chenjiahan in #16933
- perf(loader): skip success replies for parallel loader logs by @chenjiahan in #16934
- perf(loader): skip success replies for emitted warnings and errors by @chenjiahan in #16936
- perf(loader): skip success replies for parallel loader state updates by @chenjiahan in #16937
- perf(loader): lazily track parallel loader requests by @chenjiahan in #16943
- perf(stats): share issuer fields across module entries by @SyMind in #16960
- perf(fs): bound macOS NativeFileSystem::read with semaphore by @CPunisher in #16964
- perf(loader): defer extracting parallel loader names by @chenjiahan in #16974
- perf(loader): only check the module cache for ESM loaders by @chenjiahan in #16973
- perf(stats): store module entries in columnar tables by @SyMind in #16976
- perf(binding): optimize more cold-path crates for size by @hai-x in #16970
Bug Fixes 🐞
- fix(config): allow array external item values when validating UMD externals by @ragib-mrb in #16800
- fix(cli): report circular config extends and allow shared bases by @chenjiahan in #16836
- fix(core): report unknown entry names in dependOn by @chenjiahan in #16835
- fix: treat module.exports member writes as side-effect-free by @hai-x in #16748
- fix(stats): strip ANSI codes from diagnostics when colors are disabled by @chenjiahan in #16861
- fix(core): clarify source map data URL decoding warnings by @chenjiahan in #16856
- fix(binding): preserve JavaScript stacks for module graph errors by @SyMind in #16853
- fix(core): strip single-line, multi-line, and empty error headers in cutOffMessage by @ragib-mrb in #16801
- fix: implement has() and size on createReadonlyMap by @ragib-mrb in #16797
- fix(cache): keep export-star exclusion order stable after a warm start by @guru-irl in #16532
- fix(mf): clarify invalid script remote errors by @chenjiahan in #16863
- fix(core): preserve module references across graph updates by @LingyuCoder in #16864
- fix(copy-plugin): distinguish missing files from ignored matches by @chenjiahan in #16866
- fix(html-plugin): report unreadable default templates by @chenjiahan in #16869
- fix(css): detect CSS modules via matchResource and lazily look up module IDs by @intellild in #16880
- fix(cache): support loader cache tracking missing and context dependencies by @intellild in #16851
- fix: treat Object.defineProperty on CommonJS exports as side-effect-free by @hai-x in #16749
- fix(hmr): handle reused chunk ids during lazy activation by @LingyuCoder in #16884
- fix(ids): keep compact-hashed chunk ids stable across rebuilds by @LingyuCoder in #16877
- fix(loader): preserve logger instances in parallel loaders by @chenjiahan in #16908
- fix(resolver): preserve file and missing dependencies on error and ig… by @intellild in #16891
- fix(hmr): stop emitting
.full.jscopies of asset and wasm files by @hai-x in #16911 - fix(esm-library): preserve static request positions by @JSerFeng in #16651
- fix(cache): share loader options and pkg data across restored modules by @hai-x in #16400
- fix(mf): align v1 eager shared consumption with webpack by @LingyuCoder in #16905
- fix(css): bail out concatenation for CSS modules without JavaScript source by @intellild in #16949
- fix(stats): preserve reason activity and pack module reasons by @SyMind in #16952
Refactor 🔨
- refactor(watcher): track context members in their directory watcher by @stormslowly in #16837
- refactor(watcher): route context events through directory subscriptions by @stormslowly in #16838
- refactor(watcher): split path management into focused modules by @stormslowly in #16897
- refactor(watcher): store timestamps on their owning directory by @stormslowly in #16898
- refactor(runtime): move runtime module rendering into EJS templates by @LingyuCoder in #16918
- refactor(watcher): extract time types, shared runtime helper, and regression contracts by @stormslowly in #16972
- refactor(runtime): deduplicate runtime template registration by @LingyuCoder in #16957
- refactor(runtime): use one template entry per chunk loader by @LingyuCoder in #16968
Document 📖
- docs: clarify how the CLI merges extended configurations by @chenjiahan in #16847
- docs: highlight Rsbuild support in Nuxt 4.7 by @chenjiahan in #16862
- docs: remove outdated Join us page by @chenjiahan in #16885
- docs: add VuePress to the ecosystem guide by @chenjiahan in #16886
Other Changes
- ci(chore): trim build cache statistics from the run summary by @stormslowly in #16646
- chore(deps): upgrade pnpm to 12.23.0 by @chenjiahan in #16865
- chore: install Rstack agent skills with pnpm by @chenjiahan in #16867
- chore(deps): update qs bundled in @rspack/browser by @CPunisher in #16883
- chore(deps): update patch npm dependencies by @renovate[bot] in #16922
- chore(deps): update patch crates by @renovate[bot] in #16921
- chore(deps): update dependency @swc/plugin-remove-console to v18 by @renovate[bot] in #16932
- chore(deps): update github-actions by @renovate[bot] in #16930
- chore(deps): update dependency prettier to v3.10.1 by @renovate[bot] in #16928
- chore(deps): update yarn to v4.19.0 by @renovate[bot] in #16931
- chore(deps): update dependency ts-checker-rspack-plugin to ^1.9.0 by @renovate[bot] in #16929
- chore(deps): update dependency markdown-to-jsx to ^9.11.0 by @renovate[bot] in #16927
- chore(deps): update rust crate similar-asserts to v2 by @renovate[bot] in #16941
- chore(deps): update dependency rimraf to v6 by @renovate[bot] in #16940
- chore(deps): update dependency @testing-library/jest-dom to v8 by @renovate[bot] in #16939
- chore(deps): update dependency mermaid to ^12.4.0 by @renovate[bot] in #16938
- chore(deps): update swc-next to 0.9.1 by @CPunisher in #16967
- test(watcher): add baseline contracts for mid-batch and file-backed context time info by @stormslowly in #16958
- chore(deps): update cargo-bins/cargo-binstall action to v1.28.0 by @renovate[bot] in #16971
- revert(fs): restore blocking module file reads by @CPunisher in #16982
Full Changelog: v2.3.4...v2.3.5