github web-infra-dev/rsbuild v1.5.0-beta.2

latest releases: v1.5.3, v1.5.2, v1.5.1...
21 days ago

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 🚀

Bug Fixes 🐞

Document 📖

  • docs(lazy-compilation): update default value and version history by @chenjiahan in #5837

Other Changes

Full Changelog: v1.5.0-beta.1...v1.5.0-beta.2

Don't miss a new rsbuild release

NewReleases is sending notifications on new releases.