github web-infra-dev/rspack v1.1.0-beta.0

15 hours ago

Highlight

New experiments.incremental

We are implementing a new incremental rebuild architecture that makes the HMR much faster. It's an experimental feature in v1.1 and we still have more work to do before we stabilize it, but for now we have implemented parts of it and seen significant performance boosts.

In a case of 10000 React components, the HMR becomes 38% faster:

Tip

Checkout our docs for more details, and it's still in early stage but we hope you can try it out and provide us with some bugs and feedback at #8106.

Faster output.hashFunction

Rspack's output.hashFunction now defaults to the faster xxhash64, and the output.hashDigestLength now defaults to 16 (prev 20).

In the very large projects, this change will bring a significant performance improvement:

hyperfine --warmup 1 --runs 3 'HASH_FUNCTION=md4 node --run build:rspack' 'HASH_FUNCTION=xxhash64 node --run build:rspack'
Benchmark 1: HASH_FUNCTION=md4 node --run build:rspack
  Time (mean ± σ):     11.428 s ±  0.758 s    [User: 83.504 s, System: 5.808 s]
  Range (min … max):   10.892 s … 12.295 s    3 runs

Benchmark 2: HASH_FUNCTION=xxhash64 node --run build:rspack
  Time (mean ± σ):      9.697 s ±  0.318 s    [User: 79.664 s, System: 6.127 s]
  Range (min … max):    9.374 s … 10.009 s    3 runs

Summary
  HASH_FUNCTION=xxhash64 node --run build:rspack ran
    1.18 ± 0.09 times faster than HASH_FUNCTION=md4 node --run build:rspack

Related PR: #8249

What's Changed

Performance Improvements ⚡

Exciting New Features 🎉

Bug Fixes 🐞

  • fix: temporarily use lightingcss_rs to fix CSS property order by @GiveMe-A-Name in #8182
  • fix(deps): upgrade rspack_resolver 0.3.5 to fix extensionAlias edge cases by @SoonIter in #8188
  • fix: should correct cacheGroups test regex by @JSerFeng in #8204
  • fix(type): rspack function type in cjs require by @SoonIter in #8169
  • fix(modern-module): concatenate entry module regardless bail reasons by @fi3ework in #8165
  • fix(ci): trigger pkg-preview when the needs are skipped by @shulaoda in #8216
  • fix: incremental provided exports should rebuild clean exports info by @ahabhgk in #8221
  • fix: module_executor support layer by @jerrykingxyz in #8212
  • fix: expose incremental.buildChunkGraph by @JSerFeng in #8240
  • fix: compile time evaluation of require.ensure by @LingyuCoder in #8242
  • fix(cli): display the error which is thrown by the plugin during the starting of rspack serve by @LingyuCoder in #8244
  • fix: preserve star export from external module by @fi3ework in #8217
  • fix: sourceMapFilename is relative by @SyMind in #8269
  • fix(type): Make iterators compatible with TS 5.6 --target ESNext by @andersk in #8279

Document Updates 📖

Other Changes

New Contributors

Full Changelog: v1.0.14...v1.1.0-beta.0

Don't miss a new rspack release

NewReleases is sending notifications on new releases.