- CSS-only entries using native CSS support now emit standalone stylesheets without an unnecessary JavaScript bundle
- Standalone runtime chunks are omitted when no JavaScript entry needs them
- Native CSS support now recognizes webpackIgnore and its rspackIgnore alias for @import, url(), and image-set() dependencies
- Parent and child compilers with experiments.newCache now coordinate access to shared persistent cache storage while keeping their entries separate
- Upgrade simd-utf16-len to 0.2.0
- Infer shared module exports from fallback in module federation
- Prevent duplicate exports renaming in modern-module output
- Preserve shared connections during module concatenation
- Expose original source in succeedModule hooks
- Normalize HttpUriPlugin allowedUris before matching
- Do not terminate the enclosing scope after a do-while loop in JavaScript
- Invoke loader hooks through the native hook
- Enforce HttpUriPlugin lockfile integrity in frozen builds
- Drop trailing comma when rewriting require.resolve calls
- Preserve string BOM across native boundaries in loader
From rspack
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 https://github.com/web-infra-dev/rspack/pull/15314
- feat: share persistent cache cross child compilers by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/15616
- feat: support css entry bundling by @intellild in https://github.com/web-infra-dev/rspack/pull/14879
Performance 🚀
- perf(sources): upgrade simd-utf16-len to 0.2.0 by @SyMind in https://github.com/web-infra-dev/rspack/pull/15562
- perf(binding): share hook registration code across hook types by @intellild in https://github.com/web-infra-dev/rspack/pull/15619
Bug Fixes 🐞
- fix(mf): infer shared module exports from fallback by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/15582
- fix: prevent duplicate exports renaming in modern-module output by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/15559
- fix: preserve shared connections during module concatenation by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/15578
- fix(binding): expose original source in succeedModule hooks by @SyMind in https://github.com/web-infra-dev/rspack/pull/15600
- fix: normalize HttpUriPlugin allowedUris before matching by @SyMind in https://github.com/web-infra-dev/rspack/pull/15604
- fix(javascript): do not terminate the enclosing scope after a do-while loop by @nest-aka-swan in https://github.com/web-infra-dev/rspack/pull/15618
- fix(loader): invoke loader hooks through the native hook by @intellild in https://github.com/web-infra-dev/rspack/pull/15591
- fix: enforce HttpUriPlugin lockfile integrity in frozen builds by @SyMind in https://github.com/web-infra-dev/rspack/pull/15609
- fix: drop trailing comma when rewriting require.resolve calls by @perbergland in https://github.com/web-infra-dev/rspack/pull/15656
- fix(loader): preserve string BOM across native boundaries by @intellild in https://github.com/web-infra-dev/rspack/pull/15632
Refactor 🔨
- refactor: remove BuildResult.optimization_bailouts by @hardfist in https://github.com/web-infra-dev/rspack/pull/15545
- refactor: let modules own dependencies and async blocks by @hardfist in https://github.com/web-infra-dev/rspack/pull/15550
- refactor: derive module dependency IDs from references by @hardfist in https://github.com/web-infra-dev/rspack/pull/15556
- refactor: clarify dependency accessors by @hardfist in https://github.com/web-infra-dev/rspack/pull/15575
- refactor: share built modules with the module cache by @hardfist in https://github.com/web-infra-dev/rspack/pull/15527
- refactor: stream new cache writes directly into database batches by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/15638
- refactor(loader): replace should-yield hooks with execution kind by @intellild in https://github.com/web-infra-dev/rspack/pull/15592
Document 📖
- docs: clarify descriptionData matching conditions by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15549
- docs: simplify AGENTS.md template by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15558
- docs: simplify agent instructions by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15560
- docs: align target-dependent globals and loading defaults by @pangxie1991 in https://github.com/web-infra-dev/rspack/pull/15568
- docs: simplify ESM configuration examples and output descriptions by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15570
- docs: clarify package resolution defaults and condition priority by @Fyerl in https://github.com/web-infra-dev/rspack/pull/15571
- docs: clarify performance hint defaults and asset filtering by @Fyerl in https://github.com/web-infra-dev/rspack/pull/15572
- docs: clarify resolve and performance configuration examples by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15577
- docs: clarify fullySpecified behavior and configuration by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15580
- docs: correct Lightning CSS unusedSymbols option type by @HashemKhalifa in https://github.com/web-infra-dev/rspack/pull/15613
- docs: add Extension.js to the ecosystem page by @cezaraugusto in https://github.com/web-infra-dev/rspack/pull/15630
- docs: correct default for module.parser["css/auto"].dashedIdents by @sverrejoh in https://github.com/web-infra-dev/rspack/pull/15647
Other Changes
- chore: document persistent cache format policy by @hardfist in https://github.com/web-infra-dev/rspack/pull/15551
- ci: run standalone crate checks only on main by @hardfist in https://github.com/web-infra-dev/rspack/pull/15564
- chore(docs): correct filename derivation and ESM output defaults by @pangxie1991 in https://github.com/web-infra-dev/rspack/pull/15567
- chore(docs): fix standalone configuration examples and type declarations by @pangxie1991 in https://github.com/web-infra-dev/rspack/pull/15566
- chore(skills): update skills and simplify local descriptions by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15569
- chore: update pull request template by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15584
- test: use native ESM configs in e2e tests by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15607
- test: migrate e2e test runner to Rstest by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15606
- chore(deps): update dependency rspack-vue-loader to ^17.7.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15622
- chore(deps): update dependency @rstackjs/load-config to v1 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15623
- test: remove duplicate incremental e2e project by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15620
- chore: remove unused files by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15625
- chore(ci): replace Corepack with pnpm action by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15634
- test: expand new cache coverage and test harness support by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/15563
- chore(ci): enable Corepack for resolver PnP fixtures by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15640
- chore(deps): upgrade swc_core to 78.0.0 by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15639
- chore(deps): update patch npm dependencies by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15646
- chore: add docs writer and update skills by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/15653
- chore(deps): update react to v19.3.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15651
- chore(deps): update dependency mermaid to v12 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15652
- chore(deps): update dependency memfs to v4.74.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15649
- chore(deps): update dependency cspell to ^10.3.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15648
- chore(deps): update pnpm to v11.26.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/15650
- chore(deps): upgrade swc_core to 79.0.0 by @stormslowly in https://github.com/web-infra-dev/rspack/pull/15661
New Contributors
- @pangxie1991 made their first contribution in https://github.com/web-infra-dev/rspack/pull/15567
- @Fyerl made their first contribution in https://github.com/web-infra-dev/rspack/pull/15571
- @nest-aka-swan made their first contribution in https://github.com/web-infra-dev/rspack/pull/15618
- @cezaraugusto made their first contribution in https://github.com/web-infra-dev/rspack/pull/15630
- @sverrejoh made their first contribution in https://github.com/web-infra-dev/rspack/pull/15647
- @perbergland made their first contribution in https://github.com/web-infra-dev/rspack/pull/15656
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.2.3...v2.2.4