Highlights 💡
Barrel file optimization
Rspack's experimental barrel file optimization has been enabled by default.
When building applications with barrel files, this optimization should make builds significantly faster.
# Without barrel optimization
Benchmark 1: node --run build:rsbuild
Time (mean ± σ): 1.708 s ± 0.040 s [User: 4.624 s, System: 2.005 s]
Range (min … max): 1.655 s … 1.757 s 5 runs
# With barrel optimization
Benchmark 2: BARREL=true node --run build:rsbuild
Time (mean ± σ): 1.253 s ± 0.007 s [User: 3.179 s, System: 1.292 s]
Range (min … max): 1.240 s … 1.258 s 5 runs
Summary
BARREL=true node --run build:rsbuild ran
1.36 ± 0.03 times faster than node --run build:rsbuild
This optimization can be disabled via experiments.lazyBarrel:
// rsbuild.config.mjs
export default {
tools: {
rspack: {
experiments: {
lazyBarrel: false,
},
},
},
};
What's Changed
Performance 🚀
- perf: enable Rspack's barrel file optimization by default by @chenjiahan in #5840
- perf: enable Rspack's inline enum optimization by @chenjiahan in #5841
Bug Fixes 🐞
- fix(cache): handle fs operations errors by @chenjiahan in #5839
- fix(types): loosen plugin apply type to support older versions by @chenjiahan in #5842
Document 📖
- docs(lazy-compilation): update default value and version history by @chenjiahan in #5837
Other Changes
- chore: enable no-unsafe-enum-comparison lint rule by @chenjiahan in #5833
- chore(deps): update actions/checkout action to v5 by @renovate[bot] in #5834
- chore(deps): update all patch dependencies by @renovate[bot] in #5835
- chore(deps): update dependency @rslib/core to v0.12.0 by @renovate[bot] in #5836
- release: 1.5.0-beta.2 by @chenjiahan in #5843
Full Changelog: v1.5.0-beta.1...v1.5.0-beta.2