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