Highlights
Less duplicate code. Smaller bundles. 📦
Rspack's chunking algorithm has been improved to reduce duplicate modules across chunks. (#15885)
rspack-chunking.mp4
Smaller package size
Rspack upgrades browserslist-rs and enables deflate compression for its browser data, reducing native binary by 2.13 MB (3.08%). (#16009)
What's Changed
New Features 🎉
Performance 🚀
- perf(binding): query compilation modules lazily by @SyMind in #15906
- perf: avoid transferring unused NormalModuleFactory dependencies by @ahabhgk in #15931
- perf(sources): compact retained source storage by @SyMind in #15944
- perf(stats): cache item type strings in StatsFactory by @stormslowly in #15779
- perf: use a hash set to deduplicate extracted comments by @CoderSerio in #15967
- perf(watcher): avoid per-node concurrent sets in the root analyzer by @guru-irl in #15965
- perf: share Module and KnownBuildInfo accessors by @LingyuCoder in #15883
- perf: optimize placeholder and Node external matching by @intellild in #15808
- perf(sources): profile allocations and trim source map capacity by @SyMind in #16014
- perf(sources): release generated value after static source map by @SyMind in #16022
- perf(core): cache assetEmitted source and content per info object by @guru-irl in #15963
- perf(binding): share NormalModule accessors by @LingyuCoder in #16039
- perf: share equal factorize path lists by content by @LingyuCoder in #16036
- perf(split-chunks): reuse function chunks filter results per chunk set by @guru-irl in #15964
- perf(binding): materialize module source maps lazily by @LingyuCoder in #15882
- perf: share compilation log entry accessors by @LingyuCoder in #16052
- perf(cache): restore cached modules off the make main task by @guru-irl in #16050
- perf(core): share file counter dependency lists by interned content by @LingyuCoder in #16043
Bug Fixes 🐞
- fix(types): allow void returns in needAdditionalPass hooks by @chenjiahan in #15908
- fix(types): accept falsy loaders and child compiler plugins by @chenjiahan in #15912
- fix(types): allow single loader returns from rule use functions by @chenjiahan in #15920
- fix: preserve interned path sharing in cache serialize by @ahabhgk in #15910
- fix(types): correct Compilation.getAsset return type by @chenjiahan in #15932
- fix(binding): scope importModule publicPath callbacks to compiler by @chenjiahan in #15928
- fix(binding): release transient TSFN callbacks by @SyMind in #15938
- fix(types): allow omitting child compiler plugins by @chenjiahan in #15948
- fix(css): load async stylesheets with a shared runtime by @intellild in #15869
- fix(deps): upgrade lightningcss to 1.0.0-alpha.72 by @chenjiahan in #15991
- fix: propagate async status through lazy barrel re-exports by @dmchoi77 in #15905
- fix(copy): register a missing glob base dir as a missing dependency by @BleedingDev in #15901
- fix(css): end unterminated url() at EOF as a url token by @IShinji in #15911
- fix: preserve statement boundaries in modern-module output by @LingyuCoder in #16008
- fix(ids): rehash identical keys in compact-hashed ids by @n0th1ng-else in #15915
- fix(deps): upgrade swc_core to 82.0.0 by @LingyuCoder in #16009
- fix: resolve aliases in import.meta.glob patterns by @aryan1306 in #15898
- fix: only source map JS and CSS assets from devtool, matching webpack by @Paca-Vaca in #16018
- fix: support deferred imports introduced by hot updates by @LingyuCoder in #16015
- fix: concatenate empty CommonJS modules without export access by @JSerFeng in #15913
- fix(core): ignore source map directives in JavaScript strings by @Tiancheng-Xu in #15969
- fix(css-extract): preserve relative paths from publicPath callbacks by @chenjiahan in #15923
- fix(lazy-compilation): keep import attributes and phase when building activated modules by @stormslowly in #16023
- fix(lazy-compilation): keep activated modules across rebuilds by @stormslowly in #15134
- fix(lazy-compilation): keep issuer and resolve options when building activated modules by @stormslowly in #16024
- fix(watcher): report watched files inside directories that appear by @guru-irl in #15966
- fix(mf): honor singleton options for shared prefixes in manifests by @LingyuCoder in #16012
- fix(watcher): report recreated files by their final state by @guru-irl in #16040
- fix: preserve pure exports during module concatenation by @LingyuCoder in #16053
- fix(resolver): keep RegExp restrictions in ResolverFactory cache key by @stormslowly in #16054
Document 📖
- docs: use synchronous tap in getStats example by @chenjiahan in #15981
- docs: fix CopyRspackPlugin patterns example by @chenjiahan in #15982
- docs: mark asynchronous compiler hook callbacks async by @chenjiahan in #15983
- docs: fix asset name in processAssets example by @chenjiahan in #15985
- docs: avoid duplicate declarations in resolver example by @chenjiahan in #15987
- docs: use supported compilation hooks in examples by @chenjiahan in #15984
- docs: clarify source map asset filtering by @chenjiahan in #15990
- docs: define RuntimeGlobals in addRuntimeModule example by @chenjiahan in #15986
- docs: register run examples on the run hook by @chenjiahan in #15989
- docs: await module rebuilds in finishModules example by @chenjiahan in #15988
- docs: clarify emitAsset filename conflicts by @chenjiahan in #15992
- docs: fix statsNormalize option assignment by @chenjiahan in #15994
- docs: document compilation hook factory parameters by @chenjiahan in #15998
- docs: document ignoring requests in afterResolve by @chenjiahan in #16001
- docs: call the runtime hash getter in example by @chenjiahan in #15996
- docs: clarify compilation hash properties by @chenjiahan in #15995
- docs: document compile hook parameters by @chenjiahan in #15997
- docs: document resolveForScheme hook map and return value by @chenjiahan in #16000
- docs: correct statsPreset hook map type by @chenjiahan in #15999
- docs: clarify child compiler inheritance by @chenjiahan in #15993
- docs: improve page descriptions for documentation discovery by @chenjiahan in #16004
- docs: clarify target defaults and Lightning CSS inheritance by @intellild in #15546
- docs: add RomeOS to homepage users by @chenjiahan in #16056
- docs: document SWC loader reactCompiler option by @chenjiahan in #16060
- docs: clarify Rspack-specific SWC loader options by @chenjiahan in #16062
- docs: fix missing imports and variables in config examples by @chenjiahan in #16063
- docs: fix SWC examples and simplify isolatedModules guidance by @chenjiahan in #16064
Other Changes
- test: migrate more configurations to TypeScript by @chenjiahan in #15919
- test: migrate nine more configurations to TypeScript by @chenjiahan in #15925
- test: migrate persistent caching example to TypeScript by @chenjiahan in #15937
- chore(deps): update rust crate swc_config to 6.0.1 by @renovate[bot] in #15954
- chore(deps): update dependency @shikijs/transformers to ^4.5.0 by @renovate[bot] in #15956
- chore(deps): update dependency enhanced-resolve to v5.26.0 by @renovate[bot] in #15957
- chore(deps): update dependency memfs to v4.80.0 by @renovate[bot] in #15958
- chore(deps): update patch npm dependencies by @renovate[bot] in #15953
- chore(deps): update dependency playwright to v1.63.0 by @renovate[bot] in #15959
- chore(deps): update rust crate xxhash-rust to v0.8.16 [security] by @renovate[bot] in #15961
- chore(deps): update github-actions by @renovate[bot] in #15976
- chore(deps): update patch npm dependencies by @renovate[bot] in #15971
- chore(deps): update dependency ws to ^8.22.0 by @renovate[bot] in #15975
- chore(deps): update dependency tinypool to ^2.2.0 by @renovate[bot] in #15973
- chore(deps): update dependency mermaid to ^12.1.0 by @renovate[bot] in #15972
- chore(deps): update dependency webpack-sources to v3.6.0 by @renovate[bot] in #15974
- chore(deps): update patch crates by @renovate[bot] in #15645
- chore(deps): upgrade winnow to v1 by @chenjiahan in #16003
- chore(deps): update Rstest to ^0.12.3 by @renovate[bot] in #16033
- chore(deps): update pnpm to v11.28.5 by @renovate[bot] in #16032
- chore(deps): update rust crate async-recursion to 1.2.0 by @renovate[bot] in #16034
- chore(ci): align Dylint with the project Rust toolchain by @intellild in #16042
- chore: disable resolve cache by default for new cache by @ahabhgk in #16055
- chore(deps): upgrade rstack to v0.8.3 by @chenjiahan in #16059
New Contributors
- @dmchoi77 made their first contribution in #15905
- @IShinji made their first contribution in #15911
- @aryan1306 made their first contribution in #15898
- @Paca-Vaca made their first contribution in #16018
- @Tiancheng-Xu made their first contribution in #15969
Full Changelog: v2.2.8...v2.2.9