github web-infra-dev/rspack v2.2.7

4 hours ago

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 🎉

Performance 🚀

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 📖

Other Changes

Full Changelog: v2.2.6...v2.2.7

Don't miss a new rspack release

NewReleases is sending notifications on new releases.