github web-infra-dev/rspack v2.3.0

2 hours ago

What's Changed

🎉 See Announcing Rspack 2.3 for more details.

New Features 🎉

Performance 🚀

  • perf(size): box hot async entry futures to shrink binding size by @stormslowly in #16085
  • perf(sources): avoid retaining serialized source maps by @LingyuCoder in #16072
  • perf(loader): schedule loader chains as execution units by @intellild in #15401
  • perf(loader-runner): read process.env.WASM once by @guru-irl in #16127
  • perf: avoid creating untouched loader buildInfo by @guru-irl in #16077
  • perf(resolver): prefer package directories in node_modules by @stormslowly in #16154
  • perf(watch): lazily convert native watcher time info by @stormslowly in #16187
  • perf(watcher): reuse directory analysis for unchanged subscriptions by @stormslowly in #16180
  • perf(core): emit ESM export value descriptors when safe by @patrickkunka in #15936
  • perf: reuse residual SplitChunks candidates in place by @JSerFeng in #16081
  • perf(core): scan inline named exports linearly by @kdy1 in #16224
  • perf(core): skip substring search when path has no fragment marker by @kdy1 in #16223
  • perf(split-chunks): match built-in cache group conditions once per compilation by @guru-irl in #16129
  • perf(sources): use slice iteration when parsing string arrays by @kdy1 in #16283
  • perf(sources): read source map fields from the JSON tape by @kdy1 in #16297
  • perf: avoid VLQ accumulation for single-sextet mapping values by @kdy1 in #16298
  • perf(binding): preserve native source graphs during asset updates by @LingyuCoder in #16207

Bug Fixes 🐞

  • fix: skip build dependency collection after fatal compilation errors by @ahabhgk in #16074
  • fix(resolver): resolve tsconfig extends through the real path by @orgads in #15718
  • fix(split-chunks): deduplicate remaining copies in named groups by @JSerFeng in #16075
  • fix(css): align CSS Modules behavior with webpack css-loader fixtures by @intellild in #15816
  • fix(tracing): convert JavaScript trace nanoseconds to microseconds by @LingyuCoder in #16103
  • fix: stabilize module rendering order across platforms by @hai-x in #16100
  • fix(binding): avoid shared property leak warnings on process exit by @SoonIter in #16117
  • fix: use the module exports argument for the AMD exports dependency by @LingyuCoder in #16122
  • fix: respect module arguments in AMD code generation by @hai-x in #16148
  • fix(mf): make deterministic IDs independent of project paths by @LingyuCoder in #16152
  • fix(watch): make node watch time info entries deterministic by @LingyuCoder in #16126
  • fix(javascript): reuse parser source type by @CPunisher in #16102
  • fix: link import bindings inside define callbacks by @hai-x in #16159
  • fix(javascript): respect block function scope by @CPunisher in #16162
  • fix(css): localize type-first nested selectors by @intellild in #16011
  • fix(javascript): preserve legacy parser behavior by @CPunisher in #16164
  • fix(lazy-compilation): avoid barrel reloads on activation by @JSerFeng in #16026
  • fix(split-chunks): support minRemainingSize by @JSerFeng in #15594
  • fix: release updated allocative crates to resolve napi feature mismatch by @intellild in #16171
  • fix(HMR): correct hot updated chunk path resolution in Node.js HMR by @hai-x in #16174
  • fix(release): synchronize workspace versions and CLI peer dependencies by @intellild in #16181
  • fix: inherit splitChunks request limits in cache groups by @hai-x in #16191
  • fix(css): calculate CSS module hashes from graph dependencies by @intellild in #16120
  • fix(core): preserve shorthand assignment keys in concatenation by @dajiaohuang in #16205
  • fix(cache): unify snapshot path matching and package lookup by @ahabhgk in #16194
  • fix(javascript): correct loose equality evaluation for nullish values by @NaamuKim in #16141
  • fix(lazy-compilation): avoid reposting active ids on dispose by @dajiaohuang in #16200
  • fix: allocative crate package names by @intellild in #16212
  • fix(mf): support consumes runtime without chunk loading by @LingyuCoder in #16209
  • fix(mf): normalize single-item container share scopes by @chenjiahan in #16251
  • fix(css): localize animation names before !important by @dajiaohuang in #16204
  • fix(watcher): keep watching when unwatching a stale path fails by @sarankumar1325 in #16199
  • fix(sri): generate integrity hashes for chunks that only contain extracted css by @ojj1123 in #15711
  • fix: inherit sideEffects through nested package metadata by @JSerFeng in #15336
  • fix(types): narrow EvalSourceMapDevToolPlugin options by @chenjiahan in #16265
  • fix(css): keep media attribute of hot replaced stylesheets by @CyberAP in #16214
  • fix(rsc): collect client components from all entry dependencies by @sarankumar1325 in #16254
  • fix(watcher): invalidate on native watcher removals by @guru-irl in #16284
  • fix(watcher): report a removed file once when it stays a dependency by @guru-irl in #16305
  • fix: raise inherited SWC target cap to ES2024 by @chenjiahan in #16314
  • fix(css): preserve stylesheet attributes and state during HMR by @chenjiahan in #16287
  • fix: update named chunks when merging or removing chunks by @hai-x in #16312
  • fix(watcher): preserve native event delivery while JavaScript is blocked by @ScriptedAlchemy in #16106
  • fix: include module_id in chunk hashing by @hai-x in #16168
  • fix(ci): update Dylint to 6.3.0 by @intellild in #16332

Refactor 🔨

  • refactor(binding): retain DependencyRef in JavaScript wrappers by @SyMind in #16061
  • refactor(sources): use a source-wide UTF-16 index and remove object pool by @SyMind in #16083
  • refactor(javascript): remove redundant ESTree AST wrappers by @CPunisher in #16098
  • refactor: reuse current module in dependency templates by @hai-x in #16149
  • refactor(javascript): emit mangled destructuring keys as strings by @CPunisher in #16147
  • refactor(cache): reuse persistent cache options for newCache by @ahabhgk in #16160
  • refactor(css): share CSS module graph traversal by @intellild in #16119
  • refactor(css): query placeholders from compiled templates by @intellild in #16169
  • refactor: remove unused __rspack_esm_id export from module chunks by @hai-x in #16193
  • refactor(binding): use registered symbols across Rust and JS by @SyMind in #16210
  • refactor: remove dead code and unused parameters by @hai-x in #16217
  • refactor: reuse modules and connections already in hand by @hai-x in #16197
  • refactor: use SIMD UTF-16 length for dependency locations by @SyMind in #15585
  • refactor: reuse data already in hand instead of looking it up again by @hai-x in #16218

Document 📖

Other Changes

New Contributors

Full Changelog: v2.2.9...v2.3.0

Don't miss a new rspack release

NewReleases is sending notifications on new releases.