npm @rspack/cli 1.2.0-alpha.0
v1.2.0-alpha.0

latest release: 1.2.0-beta.0
11 days ago

Highlights 💡

No longer watching node_modules

Rspack v1.2 no longer watching the node_modules directory by default. This can greatly reduce the number of files to watch and improve performance.

According to our benchmark repo, this change will:

  • Reduce memory usage by 120MB.
  • Increase dev startup speed by 40%.
  • Increase HMR speed by 20~30.

This change will not affect symlinked resources in monorepo, as symlinked resources are resolved to their real path by default.

Related PR: perf: ignore watching files in node_modules by @chenjiahan in #8645

Upgrade to SWC v9

The Rust crate swc_core has been upgraded to 9.0.0. Users of the SWC Wasm plugin need to ensure version consistency with the swc_core being used, otherwise, it may lead to unforeseen issues.

For more details, see SWC Plugin Version Unmatched.

Related PR: feat(core)!: bump swc_core to 9.0.0 by @andersk in #8639

What's Changed

Performance Improvements ⚡

  • perf: remove tokio-console to reduce binary size by @chenjiahan in #8681
  • perf: bump miette v7 to reduce binary size by @chenjiahan in #8694
  • perf(incremental): compute affected cgm incrementally by @ahabhgk in #8688
  • perf: reduce memory consumption of CachedSource by @h-a-n-a in #8666
  • perf: faster substring of rspack-sources by @h-a-n-a in #8731
  • perf: side effects when there aren't too many optimizable dependencies by @ahabhgk in #8746
  • perf: parallelize side effects optimization by @ahabhgk in #8781
  • perf(deps): bump fast-glob to v0.4.1 by @shulaoda in #8800
  • perf: improve FlagDependencyExportsPlugin for large JSON by depth by @hai-x in #8802
  • perf(incremental): better parallel for side effects plugin rebuild by @ahabhgk in #8848
  • perf(cli): remove Node.js semver checker by @chenjiahan in #8855
  • perf(cli): lazy import rechoir and interpret by @chenjiahan in #8856

Exciting New Features 🎉

Bug Fixes 🐞

  • fix: external module move out initial chunk by @SyMind in #8644
  • fix: escape css by @JSerFeng in #8698
  • fix: the wrong filename was passed when calling the assetEmitted hook by @inottn in #8709
  • fix: module concatenation for dynamic export info by @ahabhgk in #8730
  • fix: duplicate move lock files by @LingyuCoder in #8732
  • fix: fix nightly release compare-before-emit-disable test failed by @jerrykingxyz in #8739
  • fix: mf parse range not compat with safari by @ahabhgk in #8749
  • fix: incremental rebuild are compatible with empty artifact by @jerrykingxyz in #8758
  • fix: correct type for loaderContext.importModule by @chenjiahan in #8766
  • fix: allow empty persistent cache options by @h-a-n-a in #8813
  • fix: use cgm hash to verify rename inline modules cache by @ahabhgk in #8820
  • fix: Rspack cssParser will parse failed when url(' ') by @cbbfcd in #8824
  • fix(diagnostic): improve diagnostics for swc wasm plugins when mismatch by @SyMind in #8001
  • fix!: handle glob patterns ending with /** in CopyRspackPlugin by @inottn in #8803
  • fix(exernals): add hash to distinguish conflict id by @fi3ework in #8834
  • fix: importModule should receive error correctly by @JSerFeng in #8827
  • fix(rspack-test-tools): use process.cwd() when outside Rspack by @colinaaa in #8845
  • fix(incremental): build chunk graph with runtime chunk true by @ahabhgk in #8866
  • fix: persistent cache save ModuleArgumentDependency.id by @jerrykingxyz in #8870
  • fix(incremental): activate inactive module not codegen by @ahabhgk in #8871
  • fix: should recognize negative preload value by @JSerFeng in #8862
  • fix: correct css modules hashing to match Webpack when leading digit #8735 by @daveskybet in #8778
  • fix: rspack_version macro support match alpha version by @jerrykingxyz in #8880

Document Updates 📖

Other Changes

New Contributors

Full Changelog: v1.1.8...v1.2.0-alpha.0

Don't miss a new cli release

NewReleases is sending notifications on new releases.