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