Repository navigation
Releases: web-infra-dev/rspack
Release list
v2.3.0-beta.1
What's Changed
Breaking Changes 🍭
Thefilter.code loader option (introduced in 2.3.0-beta.0) has been renamed tocodeFilter . If you are upgrading from 2.3.0-beta.0, replacefilter: { code: ... } withcodeFilter: ... in your loader config. No action is needed if you never usedfilter.code .
// 2.3.0-beta.0
{ loader: 'my-loader', filter: { code: 'customMacro(' } }
// 2.3.0-beta.1
{ loader: 'my-loader', codeFilter: 'customMacro(' }New Features 🎉
- feat(create-rspack): display version in startup banner by @chenjiahan in #16167
Performance 🚀
- perf(resolver): prefer package directories in node_modules by @stormslowly in #16154
Bug Fixes 🐞
- 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
Refactor 🔨
- refactor(css): share CSS module graph traversal by @intellild in #16119
- refactor(css): query placeholders from compiled templates by @intellild in #16169
Document 📖
- docs: clarify loader code filters and add examples by @chenjiahan in #16182
Other Changes
Full Changelog: v2.3.0-beta.0...v2.3.0-beta.1
v2.3.0-beta.0
Highlights
JavaScript parsing with SWC Next
Rspack now uses SWC Next for JavaScript parsing. This beta also includes follow-up compatibility fixes for block-scoped functions, parser source types, and legacy parser behavior. See #16089.
Content-based loader filtering
The new loader filter.code option accepts a string or regular expression and checks the loader's current input before running its normal transform. Loaders can skip files that do not contain the syntax or markers they need to process, avoiding unnecessary transformation work. For example, a loader that transforms customMacro() calls can use filter: { code: 'customMacro(' } to skip inputs without that marker. Pitch functions are unaffected. See #16073.
Better SplitChunks output
Named cache groups now remove redundant module copies from source chunks connected to the same shared chunk, reducing duplicate code in affected builds. Rspack also supports splitChunks.minRemainingSize to avoid splits that leave undersized chunks, bringing JavaScript and extracted CSS output closer to webpack. For example, an affected asynchronous CSS import now retains its expected controls.css filename in production. See #16075 and #15594.
Better watcher compatibility
Native and Node watch file systems now expose watchpack-compatible getTimes(), getTimeInfoEntries(), and collectTimeInfoEntries() APIs. With experiments.nativeWatcher, compiler.fileTimestamps, compiler.contextTimestamps, and the watcher's getInfo() now return real timestamp entries, improving compatibility with plugins that rely on watch metadata, such as ts-loader, webpack-virtual-modules, and vue-loader. The Node watcher also merges time-info entries deterministically so directory timestamps are preserved regardless of dependency iteration order. See the WatchFileSystem API documentation, #15754 and #16126.
Memory improvements and diagnostics
Rspack avoids retaining serialized source maps, reducing memory retained by source objects. Source handling also uses a source-wide UTF-16 index and removes its object pool. See #16072 and #16083.
New allocative-based memory diagnostics help identify which Rust data structures retain memory during builds and HMR updates. See the memory diagnostics guide to capture and analyze snapshots.
What's Changed
New Features 🎉
- feat: integrate allocative snapshots and profiling skill into Rspack by @intellild in #16046
- feat: support module.parser.javascript.dynamicUrl by @HashemKhalifa in #15933
- feat(watcher): expose watchpack times API on native and node watch file systems by @stormslowly in #15754
- feat(javascript): migrate parser to SWC Next by @LingyuCoder in #16089
- feat: add loader codeFilter prefilter by @SyMind in #16073
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
Bug Fixes 🐞
- fix: skip build dependency collection after fatal compilation errors by @ahabhgk in #16074
- fix(resolver): resolve tsconfig
extendsthrough 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
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
Document 📖
- docs: update renamed crates in project architecture by @Jarvis636431 in #16087
- docs: add parallel loader section to loader guide by @intellild in #16092
- docs: add memory diagnostics guide by @intellild in #16080
- docs: explain hot update manifest fields by @chenjiahan in #16114
- docs: clarify Rsdoctor capabilities and simplify setup guide by @chenjiahan in #16125
- docs(resolve): explain resolve.tsConfig.references matching rules by @stormslowly in #16099
- docs: clarify Rsbuild and Rspack CLI in quick start by @chenjiahan in #16155
Other Changes
- chore(deps): update patch npm dependencies by @renovate[bot] in #16029
- chore(deps): upgrade swc-next to 0.2.4 by @LingyuCoder in #16094
- chore(deps): upgrade Rspress to 2.1.0-beta.1 by @SoonIter in #16104
- chore(deps): update dependency acorn to ^8.19.0 by @renovate[bot] in #16030
- chore(docs): update Rsdoctor 2.0 usage guides by @yifancong in #16090
- chore(deps): upgrade swc-next to 0.3.0 by @LingyuCoder in #16113
- chore(deps): update dependency playwright to v1.64.1 by @renovate[bot] in #16031
- chore(deps): update swc by @renovate[bot] in #16131
- chore(deps): update patch npm dependencies by @renovate[bot] in #16130
- chore(deps): update dependency ts-checker-rspack-plugin to ^1.7.1 by @renovate[bot] in #16137
- chore(deps): update dependency @swc/plugin-remove-console to v17 by @renovate[bot] in #16139
- chore(deps): update dependency happy-dom to v21 by @renovate[bot] in #16140
- chore(deps): update dependency cac to ^7.1.0 by @renovate[bot] in https://github...
v2.2.9
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 https://github.c...
v2.2.8
What's Changed
New Features 🎉
- feat: support JavaScript URL entries with factory type probes by @intellild in #15666
- feat: resolver cache in the new cache system by @ahabhgk in #15839
Performance 🚀
- perf(core): box optional match resource data by @chenjiahan in #15831
- perf: reduce exports info and parser memory footprint by @LingyuCoder in #15821
- perf(core): box optional RSC metadata by @chenjiahan in #15837
- perf(concatenated): store binding references as indices by @LingyuCoder in #15834
- perf: reuse compilation dependency arrays and strings by @SyMind in #15763
- perf(core): box import attributes by @chenjiahan in #15844
- perf(core): shrink dependency location storage by @chenjiahan in #15849
- perf(core): store module requests as boxed strings by @chenjiahan in #15856
- perf: reduce retained dependency and source capacity by @LingyuCoder in #15854
- perf(javascript): share the used-by-exports payload of a dependency by @LingyuCoder in #15851
- perf: skip unused code splitting cache copies by @JSerFeng in #15867
- perf(stats): release handles per module while converting stats to JS by @stormslowly in #15788
Bug Fixes 🐞
- fix(types): allow void context module waterfall callbacks by @chenjiahan in #15832
- fix: revert "feat: support JavaScript URL entries with factory type probes" by @intellild in #15840
- fix: preserve deferred evaluation in modern-module output by @JSerFeng in #15846
- fix(resolve): resolve relative tsconfig paths against cwd by @intellild in #15713
- fix(rstest): resolve mock APIs through the runtime registry by @9aoy in #15823
- fix: interrupt compaction at cache shutdown by @ahabhgk in #15850
- fix(types): make SharePlugin enhanced option optional by @chenjiahan in #15855
- fix(types): align externals function signatures by @chenjiahan in #15857
- fix(types): correct externals resolver overloads by @chenjiahan in #15863
- fix: reset MultiCompiler done state on watch restart by @chenjiahan in #15865
- fix(types): allow unnamed module federation consumers by @chenjiahan in #15868
- fix: require a name for shared dependency tree shaking by @chenjiahan in #15872
- fix(types): allow stats printer hooks to return void by @chenjiahan in #15874
- fix(types): support custom stats fields in extract hooks by @chenjiahan in #15880
- fix(types): allow shouldEmit hooks to return void by @chenjiahan in #15881
- fix(types): allow Node fs as intermediate file system by @chenjiahan in #15895
- fix(types): accept entry dependencies in ModuleGraph queries by @chenjiahan in #15896
- fix(cli): enable compile cache before loading CLI by @chenjiahan in #15903
- fix: respect CI=false and skip compile cache in CI by @chenjiahan in #15904
- fix(rstest): transform non-hoisted mock APIs in expression position by @fi3ework in #15877
- fix: avoid retaining source copies in RealContentHash by @JSerFeng in #15902
- fix(loader): avoid mutating lightningcss-loader options by @tiagovilasboas in #15900
- fix(loader): normalize builtin options for inline requests by @SoonIter in #15909
Document 📖
- docs: clarify externals usage and consolidate function reference by @chenjiahan in #15866
Other Changes
- chore(deps): upgrade Rstack to 0.8.0 by @SoonIter in #15838
- chore(test): migrate 60 more configs to TypeScript by @chenjiahan in #15836
- test: migrate 47 more configs to TypeScript by @chenjiahan in #15843
- chore(test): migrate 20 cache and callback configs to TypeScript by @chenjiahan in #15852
- chore(deps): update dependency memfs to v4.79.0 by @renovate[bot] in #15891
- chore(deps): update rust crate swc_ecma_minifier to 61.0.9 by @renovate[bot] in #15890
- chore(deps): update patch npm dependencies by @renovate[bot] in #15889
- chore(deps): update dependency webpack-sources to v3.5.3 by @renovate[bot] in #15888
- test: migrate HTTP integrity configuration to TypeScript by @chenjiahan in #15892
- test: migrate five configurations to TypeScript by @chenjiahan in #15893
New Contributors
- @tiagovilasboas made their first contribution in #15900
Full Changelog: v2.2.7...v2.2.8
v2.2.7
Highlights
Smaller bundles with improved code splitting
The new optimization.splitChunks.dedupDepth option lets Rspack spend more build time finding shared code and reducing duplication, giving you more control over the balance between bundle size and build time. In one application with many routes, this option reduced total output size by 9.9%.
It defaults to 1 in production and 0 in development. #15497
Build performance improvements
This release reduces repeated work and allocations during chunk graph construction and CSS Modules class name generation. JavaScript loaders also avoid copying their input content on each invocation, further reducing processing overhead.
- Optimize chunk graph construction: #15278, #15805.
- Reuse metadata and template values when generating CSS Modules class names: #15783, #15804.
- Avoid cloning JavaScript loader content: #15817.
What's Changed
New Features 🎉
- feat(split-chunks): add configurable dedupDepth by @JSerFeng in #15497
- feat: file system info path classification by @ahabhgk in #15752
- feat: support nested async dependency blocks by @intellild in #15741
- feat: cache context modules with filesystem snapshots by @ahabhgk in #15790
Performance 🚀
- perf: reduce build chunk graph overhead by @LingyuCoder in #15278
- perf(css): avoid rebuilding local ident metadata per class name by @LingyuCoder in #15783
- perf(resolver): memoize the interned package.json path by @LingyuCoder in #15797
- perf(css): cache invariant local ident rendering values by @intellild in #15804
- perf: store runtime keys as SmolStr by @intellild in #15807
- perf: reduce build chunk graph code splitter overhead by @LingyuCoder in #15805
- perf(css-extract): avoid per-loader configuration callbacks by @chenjiahan in #15812
- perf(loader): avoid cloning JS loader content by @SyMind in #15817
- perf(core): reuse module identifier for identical requests by @chenjiahan in #15820
- perf(loader): statically import worker_threads by @chenjiahan in #15825
- perf(core): reuse resource string for identical user requests by @chenjiahan in #15827
Bug Fixes 🐞
- fix: keep shadowing exports bindings in nested runtime deconfliction by @LingyuCoder in #15742
- fix(binding): release loader TSFNs on compiler close by @SyMind in #15735
- fix: render CommonJS externals directly in modern-module output by @JSerFeng in #15238
- fix: skip entry modules without JavaScript in the chunk startup by @cezaraugusto in #15767
- fix(html): keep the doctype when a comment is above it by @LingyuCoder in #15778
- fix(types): allow RslibPlugin without options by @chenjiahan in #15801
- fix: ignore fragment-only CSS URL dependencies by @intellild in #15800
- fix(bench): exclude compiler teardown from runtime requirements by @intellild in #15813
- fix(types): declare code generation Sources.get and migrate configs by @chenjiahan in #15814
- fix(types): allow RegExp resolve restrictions and migrate configs by @chenjiahan in #15819
- fix(cli): initialize profiling once for multiple configs by @chenjiahan in #15829
Document 📖
- docs: remove redundant CLAUDE.md setup tip by @chenjiahan in #15815
- docs: clarify default parallel loader worker count by @chenjiahan in #15824
Other Changes
- test: migrate inner-graph and HTTP test helpers to ESM by @chenjiahan in #15748
- test: migrate common test loaders to ESM by @chenjiahan in #15751
- ci: print ecosystem benchmark repository commit by @SyMind in #15746
- test: migrate test loaders, helpers and plugins to ESM by @chenjiahan in #15753
- test: migrate stateful and diagnostic loaders to ESM by @chenjiahan in #15758
- chore: add CLAUDE.md that imports AGENTS.md by @stormslowly in #15760
- test: support TypeScript case configurations by @chenjiahan in #15761
- chore(deps): upgrade Rstack to 0.7.6 and Rstest to 0.12 by @chenjiahan in #15762
- test: type-check case configs and migrate simple configs to TypeScript by @chenjiahan in #15765
- chore(deps): update dependency enhanced-resolve to v5.25.1 by @renovate[bot] in #15771
- test: migrate case configs to TypeScript (batch 1) by @chenjiahan in #15774
- test: migrate case configs to TypeScript (batch 2) by @chenjiahan in #15775
- test: migrate case configs to TypeScript (batch 3) by @chenjiahan in #15776
- test: migrate case configs to TypeScript (batch 4) by @chenjiahan in #15777
- chore(deps): update patch npm dependencies by @renovate[bot] in #15769
- chore(deps): update dependency jsdom to ^30.1.0 by @renovate[bot] in #15772
- test: migrate more case configs to TypeScript by @chenjiahan in #15787
- chore: remove redundant CLAUDE.md by @chenjiahan in #15791
- test: migrate 32 configs to TypeScript and normalize spacing by @chenjiahan in #15789
- chore(deps): upgrade lite-tapable to v1.2.0 by @chenjiahan in #15794
- test: migrate 77 configs and clean helpers to TypeScript by @chenjiahan in #15795
- test: migrate 61 configs and four helpers to TypeScript by @chenjiahan in #15803
- test: migrate more configs to TypeScript by @chenjiahan in #15806
- test: migrate more configs and helpers to TypeScript by @chenjiahan in #15811
Full Changelog: v2.2.6...v2.2.7
v2.2.6
What's Changed
New Features 🎉
- feat(loader): support buildInfo custom fields in parallel loaders by @stormslowly in #15629
Performance 🚀
- perf: streamline SplitChunks candidate preparation by @JSerFeng in #15691
- perf(loader): track loader dependencies with sets by @stormslowly in #15659
- perf(watch): defer internal Watchpack timestamp collection by @LingyuCoder in #15686
- perf: replace BigUint with FixedBitSet in code splitter by @SyMind in #15712
- perf: use SsoHashSet for small module chunk memberships by @SyMind in #15731
- perf: vectorize CSS string and URL scanning with memchr by @LingyuCoder in #15738
Bug Fixes 🐞
- fix: retain mf manifest expose assets shared with providers by @LingyuCoder in #15700
- fix(core): make module source maps context independent by @SyMind in #15671
- fix(loader): revert native loader hook invocation by @intellild in #15719
Document 📖
- docs: update hyfdev profile links by @hyfdev-agent in #15729
Other Changes
- test: make @rspack/test-tools a dual package by @chenjiahan in #15698
- test: migrate basic test entry points to ESM by @chenjiahan in #15701
- test: migrate config, compiler, HMR and cache entries to ESM by @chenjiahan in #15703
- test: migrate watcher test entries to ESM by @chenjiahan in #15706
- test: migrate lifecycle child scripts to ESM by @chenjiahan in #15707
- test: migrate request rewrite E2E loaders to ESM by @chenjiahan in #15708
- test: migrate recovery and CSS HMR loaders to ESM by @chenjiahan in #15709
- test: support ESM test configs and migrate initial fixtures by @chenjiahan in #15714
- chore(build): enable rspack runtime mode for rslib builds by @Timeless0911 in #15715
- test: remove obsolete webpack config support by @chenjiahan in #15716
- test: migrate standalone suite configs to ESM by @chenjiahan in #15721
- test: migrate asset, loader and hook configs to ESM by @chenjiahan in #15722
- test: migrate remaining test configs to ESM by @chenjiahan in #15724
- test: migrate test configs and filters to ESM by @chenjiahan in #15725
- test: migrate expectation files to ESM by @chenjiahan in #15726
- test: migrate test definitions to ESM by @chenjiahan in #15727
- test: enable supported cases and capture ESM HMR snapshots by @chenjiahan in #15732
- chore: exclude test outputs from JavaScript language service by @chenjiahan in #15733
- test: use rspack.sources in test cases by @chenjiahan in #15734
- test: migrate remaining test configs and common helpers to ESM by @chenjiahan in #15739
- ci: migrate CodSpeed simulation runner by @hardfist in #15710
New Contributors
- @hyfdev-agent made their first contribution in #15729
Full Changelog: v2.2.5...v2.2.6
v2.2.5
What's Changed
New Features 🎉
Performance 🚀
- perf(loader): use one-shot refs for js values by @stormslowly in #15636
Bug Fixes 🐞
- fix: inline runtime chunks with empty names by @LingyuCoder in #15685
- fix: align inline loader module types with webpack by @LingyuCoder in #15684
- fix(rslib): render externalized new URL targets as plain relative URLs by @elecmonkey in #15670
- fix(rstest): resolve manual mocks next to package entries by @9aoy in #15689
- fix: avoid chunk name collisions in compact hashed ids by @LingyuCoder in #15693
Refactor 🔨
- refactor(core): share BuildContext across module graph tasks by @intellild in #15674
Other Changes
- chore: migrate maintenance scripts to ESM by @chenjiahan in #15675
- chore: release version 2.2.5 by @stormslowly in #15702
Full Changelog: v2.2.4...v2.2.5
v2.2.4
Highlights
CSS-only entry bundling
CSS-only entries using native CSS support now emit standalone stylesheets without an unnecessary JavaScript bundle. Standalone runtime chunks are also omitted when no JavaScript entry needs them, making it easier to build CSS assets directly. See #14879.
Ignore magic comments in CSS
Native CSS support now recognizes webpackIgnore and its rspackIgnore alias for @import, url(), and image-set() dependencies. This lets you leave selected references for the browser to load instead of resolving and bundling them. See #15314.
Reliable persistent caching for child compilers
With experiments.newCache, parent and child compilers now coordinate access to shared persistent cache storage while keeping their entries separate. This prevents conflicting writes and cleanup from losing cached data, and allows both parent and child modules to be restored across compiler restarts. See #15616.
What's Changed
New Features 🎉
- feat(css): support ignore magic comments by @JSerFeng in #15314
- feat: share persistent cache cross child compilers by @ahabhgk in #15616
- feat: support css entry bundling by @intellild in #14879
Performance 🚀
- perf(sources): upgrade simd-utf16-len to 0.2.0 by @SyMind in #15562
- perf(binding): share hook registration code across hook types by @intellild in #15619
Bug Fixes 🐞
- fix(mf): infer shared module exports from fallback by @LingyuCoder in #15582
- fix: prevent duplicate exports renaming in modern-module output by @LingyuCoder in #15559
- fix: preserve shared connections during module concatenation by @LingyuCoder in #15578
- fix(binding): expose original source in succeedModule hooks by @SyMind in #15600
- fix: normalize HttpUriPlugin allowedUris before matching by @SyMind in #15604
- fix(javascript): do not terminate the enclosing scope after a do-while loop by @nest-aka-swan in #15618
- fix(loader): invoke loader hooks through the native hook by @intellild in #15591
- fix: enforce HttpUriPlugin lockfile integrity in frozen builds by @SyMind in #15609
- fix: drop trailing comma when rewriting require.resolve calls by @perbergland in #15656
- fix(loader): preserve string BOM across native boundaries by @intellild in #15632
Refactor 🔨
- refactor: remove BuildResult.optimization_bailouts by @hardfist in #15545
- refactor: let modules own dependencies and async blocks by @hardfist in #15550
- refactor: derive module dependency IDs from references by @hardfist in #15556
- refactor: clarify dependency accessors by @hardfist in #15575
- refactor: share built modules with the module cache by @hardfist in #15527
- refactor: stream new cache writes directly into database batches by @ahabhgk in #15638
- refactor(loader): replace should-yield hooks with execution kind by @intellild in #15592
Document 📖
- docs: clarify descriptionData matching conditions by @chenjiahan in #15549
- docs: simplify AGENTS.md template by @chenjiahan in #15558
- docs: simplify agent instructions by @chenjiahan in #15560
- docs: align target-dependent globals and loading defaults by @pangxie1991 in #15568
- docs: simplify ESM configuration examples and output descriptions by @chenjiahan in #15570
- docs: clarify package resolution defaults and condition priority by @Fyerl in #15571
- docs: clarify performance hint defaults and asset filtering by @Fyerl in #15572
- docs: clarify resolve and performance configuration examples by @chenjiahan in #15577
- docs: clarify fullySpecified behavior and configuration by @chenjiahan in #15580
- docs: correct Lightning CSS unusedSymbols option type by @HashemKhalifa in #15613
- docs: add Extension.js to the ecosystem page by @cezaraugusto in #15630
- docs: correct default for module.parser["css/auto"].dashedIdents by @sverrejoh in #15647
Other Changes
- chore: document persistent cache format policy by @hardfist in #15551
- ci: run standalone crate checks only on main by @hardfist in #15564
- chore(docs): correct filename derivation and ESM output defaults by @pangxie1991 in #15567
- chore(docs): fix standalone configuration examples and type declarations by @pangxie1991 in #15566
- chore(skills): update skills and simplify local descriptions by @chenjiahan in #15569
- chore: update pull request template by @chenjiahan in #15584
- test: use native ESM configs in e2e tests by @chenjiahan in #15607
- test: migrate e2e test runner to Rstest by @chenjiahan in #15606
- chore(deps): update dependency rspack-vue-loader to ^17.7.0 by @renovate[bot] in #15622
- chore(deps): update dependency @rstackjs/load-config to v1 by @renovate[bot] in #15623
- test: remove duplicate incremental e2e project by @chenjiahan in #15620
- chore: remove unused files by @chenjiahan in #15625
- chore(ci): replace Corepack with pnpm action by @chenjiahan in #15634
- test: expand new cache coverage and test harness support by @ahabhgk in #15563
- chore(ci): enable Corepack for resolver PnP fixtures by @chenjiahan in #15640
- chore(deps): upgrade swc_core to 78.0.0 by @chenjiahan in #15639
- chore(deps): update patch npm dependencies by @renovate[bot] in #15646
- chore: add docs writer and update skills by @chenjiahan in #15653
- chore(deps): update react to v19.3.0 by @renovate[bot] in #15651
- chore(deps): update dependency mermaid to v12 by @renovate[bot] in #15652
- chore(deps): update dependency memfs to v4.74.0 by @renovate[bot] in #15649
- chore(deps): update dependency cspell to ^10.3.0 by @renovate[bot] in #15648
- chore(deps): update pnpm to v11.26.0 by @renovate[bot] in #15650
- chore(deps): upgrade swc_core to 79.0.0 by @stormslowly in #15661
New Contributors
- @pangxie1991 made their first contribution in #15567
- @Fyerl made their first contribution in #15571
- @nest-aka-swan made their first contribution in #15618
- @cezaraugusto made their first contribution in #15630
- @sverrejoh made their first contribution in #15647
- @perbergland made their first contribution in #15656
Full Changelog: v2.2.3...v2.2.4
v2.2.3
Highlights
CSS Import and Asset URL Externals
Rspack now supports asset, asset-url, and css-import external types, allowing CSS to reference stylesheets and assets hosted elsewhere. External @import statements preserve layer, supports, and media conditions, so conditional styles stay conditional in the emitted CSS. #15431, #15522.
More Flexible and Reliable Native Watching
With experiments.nativeWatcher enabled, watchOptions.ignored now accepts a function, making it easier to reuse existing ignore rules when switching to the native watcher. File event processing has also been improved to reduce event loss during large bursts of changes on Linux. #15254.
Lower Resolution Overhead for TypeScript Projects
Relative imports such as ./utils and ../shared no longer trigger unnecessary tsconfig loading or tracking of its project-reference tree. This reduces configuration reads and dependency tracking, especially in large TypeScript projects with many project references. #15492.
What's Changed
New Features 🎉
- feat(cache): align maxMemoryGenerations with webpack by @hardfist in #15430
- feat(cache): support builtin swc-loader cache by @intellild in #15324
- feat(watcher): support a function for the native watcher
ignoredoption by @stormslowly in #15254 - feat(core): expose import attributes on NormalModuleFactory ResolveData by @kakiuwang-ui in #15439
- feat(cache): port webpack persistent module cache by @hardfist in #15380
- feat(css): support CSS import and asset URL externals by @intellild in #15431
- feat: error handling for new cache by @ahabhgk in #15525
Performance 🚀
- perf(resolver): skip tsconfig paths for relative specifiers by @stormslowly in #15492
- perf(cache): remove module serialization preflight by @hardfist in #15509
Bug Fixes 🐞
- fix: treat CJS export assignment as side-effect-free without breaking innerGraph by @JSerFeng in #14623
- fix(ci): speed up dylint and fail on warnings by @SyMind in #15376
- fix: preserve leading zeros in string module ids by @LingyuCoder in #15428
- fix(devtool): key eval cache by module to keep sourceURL correct by @stormslowly in #14866
- fix(types): improve loader context filesystem types by @chenjiahan in #15437
- fix(types): allow optionless filesystem sync calls by @chenjiahan in #15438
- fix(javascript): handle shared URL asset runtimes by @LingyuCoder in #15446
- fix(copy-plugin): reuse cache for empty rebuilds by @LingyuCoder in #15448
- fix(esm): remove empty chunks except for facade chunks by @JSerFeng in #15424
- fix(binding): guard module graph accessors against stale and mid-pass reads by @kakiuwang-ui in #15454
- fix: stabilize incremental missing-module diagnostic location by @LingyuCoder in #15456
- fix: prevent recursive module federation shared compilation by @LingyuCoder in #15494
- fix: preserve diagnostics returned by importModule by @LingyuCoder in #15496
- fix: preserve css-import external conditions by @intellild in #15522
- fix: support Windows DOS device paths by @LingyuCoder in #15507
- fix(css): substitute value references in media queries and selectors by @intellild in #15523
- fix(css): skip esm flag for concatenated modules by @LingyuCoder in #15539
- fix(ids): stabilize named external module ids by @LingyuCoder in #15540
- fix: pre-register modules before chunk graph splitting by @mvanhorn in #15308
Refactor 🔨
- refactor(javascript): internalize side effects analysis by @LingyuCoder in #15436
- refactor: share concatenation backend logic by @LingyuCoder in #15419
- refactor: avoid store and restore channel blocking by @ahabhgk in #15425
- refactor(javascript): use Rspack-owned atoms by @LingyuCoder in #15441
- refactor(core): use DependencyRef in BuildResult by @hardfist in #15457
- refactor(core): remove unnecessary DynClone from codegen data by @hardfist in #15489
- refactor: remove redundant clones in core and JSON by @hardfist in #15502
- refactor: remove unused Clone derives in core by @hardfist in #15508
- refactor(core): share published async dependency blocks by @hardfist in #15504
- refactor: remove redundant clones in core by @hardfist in #15518
- refactor: remove redundant clones and unused Clone derives by @hardfist in #15519
Document 📖
- docs: add Rstest testing guide by @9aoy in #15415
- docs: reorganize guide navigation by @chenjiahan in #15422
- docs: refine guide navigation by @chenjiahan in #15423
- docs: correct collection types in API docs by @LingyuCoder in #15429
Other Changes
- chore(deps): update rstack to v0.7.1 by @chenjiahan in #15416
- chore: support single-target preview releases by @hardfist in #15434
- test: cover isolated declarations across persistent cache modes by @intellild in #15444
- chore: bump
swc_corefrom 77.0.0 to 77.1.2 by @tusharsingh308 in #15421 - chore(deps): upgrade Rslib to 1.0.0 by @Timeless0911 in #15447
- chore: add Rspack API assessment skill by @LingyuCoder in #15470
- chore(ci): skip builds for tooling-only changes by @LingyuCoder in #15472
- chore: upgrade Rstack to v0.7.3 and simplify Rspress config by @chenjiahan in #15473
- chore(deps): update dependency terser to v5.51.2 by @renovate[bot] in #15479
- chore(deps): update dependency path-serializer to v0.7.0 by @renovate[bot] in #15478
- chore(deps): update dependency memfs to v4.69.1 by @renovate[bot] in #15477
- chore(deps): update dependency happy-dom to ^20.14.0 by @renovate[bot] in #15476
- chore(deps): update dependency cspell to ^10.2.1 by @renovate[bot] in #15475
- chore(deps): update dependency happy-dom to ^20.14.0 by @renovate[bot] in #15482
- chore(deps): update pnpm to v11.25.0 by @renovate[bot] in #15481
- chore(deps): update patch npm dependencies by @renovate[bot] in #15474
- chore(ci): remove unused workflow inputs by @stormslowly in #15499
- chore: run build-only CI targets on main by @hardfist in #15510
- chore: document Rust Clone requirements by @hardfist in #15511
- chore(ci): enable workflows for release/2.3.0 by @LingyuCoder in #15542
Full Changelog: v2.2.2...v2.2.3
v2.2.2
What's Changed
New Features 🎉
- feat(cache): add intrastructure logging to the new cache by @ahabhgk in #15338
- feat(javascript): add JavascriptModulesPlugin.getChunkFilenameTemplate by @kakiuwang-ui in #15280
Performance 🚀
- perf(ids): optimize deterministic module id assignment by @LingyuCoder in #15393
- perf: share runtimes in flag dependency usage by @LingyuCoder in #15388
- perf(core): optimize module rendering for chunk assets by @LingyuCoder in #15394
- perf(core): optimize create module hashes by @LingyuCoder in #15396
Bug Fixes 🐞
- fix(stats): generate correct prefetch child assets by @chenjiahan in #15208
- fix: keep import.meta.url in createRequire when importMeta is disabled by @lazerg in #15273
- fix(core): align module need_build and FileSystemInfo with webpack by @hardfist in #15374
- fix(types): support all EnvironmentPlugin default values by @chenjiahan in #15382
- fix: improve incremental chunk graph reuse by @LingyuCoder in #15373
- fix(rsdoctor): await patch delivery before sealing completes by @kakiuwang-ui in #15399
- fix(css): ignore exportsOnly in local ident hashes by @mattcosta7 in #15364
- fix: fallback eval devtools for modern-module by @JSerFeng in #15404
- fix: report diagnostics for unsupported context modes by @dr4gan0x in #15361
Refactor 🔨
- refactor(loader): reuse filesystem snapshots for cache dependencies by @intellild in #15366
- refactor(core): remove BuildInfo clone by @hardfist in #15377
Document 📖
- docs: correct compact hashed API names by @LingyuCoder in #15358
- docs: improve built-in plugin overview and examples by @chenjiahan in #15354
- docs: move webpack attribution to page footer by @chenjiahan in #15365
- docs: improve low-level plugin documentation by @chenjiahan in #15368
- docs: update webpack plugin compatibility by @chenjiahan in #15369
- docs: remove version info before Rspack 1.3.0 by @chenjiahan in #15371
- docs: standardize plugin documentation structure by @chenjiahan in #15378
- docs: improve BannerPlugin option documentation by @chenjiahan in #15392
- docs: improve IgnorePlugin documentation by @chenjiahan in #15395
- docs: improve plugin option documentation by @chenjiahan in #15398
- docs: remove extra code block spacing in collapse panels by @LingyuCoder in #15403
- docs: improve ContextReplacementPlugin documentation by @chenjiahan in #15410
- docs: improve CssExtractRspackPlugin documentation by @chenjiahan in #15411
- docs: improve HtmlRspackPlugin documentation by @chenjiahan in #15412
- docs: improve HTML plugin guidance by @chenjiahan in #15414
Other Changes
- chore(deps): update dependency @microsoft/api-extractor to ^7.59.0 by @renovate[bot] in #15385
- chore(deps): update patch npm dependencies by @renovate[bot] in #15383
- chore: replace Rstack CLI skill by @chenjiahan in #15387
- chore(deps): update dependency @module-federation/runtime-tools to v2.9.0 by @renovate[bot] in #15386
- chore(deps): update dependency jest-diff to ^30.5.0 by @renovate[bot] in #15389
- chore(deps): update dependency pretty-format to v30.5.0 by @renovate[bot] in #15390
- chore(release): bump all published crates in crate-version by @stormslowly in #15367
- ci: refresh self-hosted cache action reference by @deanjingshui in #15407
- chore: use heading-case as a formatter plugin by @chenjiahan in #15405
- chore(deps): update github-actions by @renovate[bot] in #15413
- chore(ci): validate website builds for fork pull requests by @LingyuCoder in #15408
New Contributors
- @mattcosta7 made their first contribution in #15364
Full Changelog: v2.2.1...v2.2.2