Highlights
Persistent cache storage options now align with webpack
Rspack now supports cache.name and cache.storage.location, aligning with webpack's persistent cache semantics. cache.storage.directory is now the base directory, while the final cache location defaults to <directory>/<cache.name>. Default cache paths remain unchanged.
If you previously used storage.directory as the exact cache path, migrate it to storage.location. Existing cache data is not migrated automatically.
cache: {
type: 'persistent',
storage: {
type: 'filesystem',
- directory: '/custom/cache',
+ location: '/custom/cache',
},
}What's Changed
New Features 馃帀
- feat(rstest): inject module origin for import.meta.rstest by @9aoy in #15006
- feat: align persistent cache storage options with webpack by @hardfist in #15049
- feat(hmr): emit css.c / css.r in the hot-update manifest for precise CSS updates by @stormslowly in #14682
Performance 馃殌
- perf: avoid cloning Lightning CSS stylesheet AST by @chenjiahan in #14982
- perf: avoid cloning CSS module lists during ordering by @chenjiahan in #14984
- perf(copy): offload asset reads by @LingyuCoder in #15022
- perf: share source across linking diagnostics by @hardfist in #15048
Bug Fixes 馃悶
- fix(binding): preserve entry dependency identity by @matthewdavis-oai in #14964
- fix(loader): preserve lightningcss license comments by @chenjiahan in #14980
- fix(esm): add missing CJS interop runtime requirement by @LingyuCoder in #14978
- fix(runtime): avoid dead require bootstrap by @LingyuCoder in #14991
- fix(runtime): preserve collision-free createRequire imports by @LingyuCoder in #14994
- fix: clean up compilation-scoped plugin caches by @matthewdavis-oai in #14999
- fix(rstest): hoist test API imports by source order by @chenjiahan in #15007
- fix(binding): release custom runtime module generators on close by @SyMind in #15008
- fix: preserve context exports in rspack runtime mode by @LingyuCoder in #15001
- fix(runtime): correct full-hash chunk filenames by @matthewdavis-oai in #14997
- fix(copy-plugin): use POSIX asset keys by @matthewdavis-oai in #15015
- fix(runtime): remove redundant runtime declarations by @LingyuCoder in #14993
- fix(worker): handle SharedWorker string name option by @elecmonkey in #15012
- fix: avoid runtime scope conflicts in module factories by @LingyuCoder in #15002
- fix: preserve direct exports bindings by @LingyuCoder in #15003
- fix(dll): serialize buildMeta.defaultObject as redirect-warn by @tusharsingh308 in #15016
- fix(json): match webpack source map behavior for generated modules by @matthewdavis-oai in #15014
- fix: keep property name when global is used in object shorthand by @lazerg in #15054
- fix: prevent compiler abort for exported rspackRequire by @LingyuCoder in #15050
Refactor 馃敤
Document 馃摉
- docs: clarify optimization.nodeEnv defaults by @chenjiahan in #14976
- docs: invite @swwind to Rspack core team by @chenjiahan in #14977
- docs(binding): document JavaScript binding architecture by @SyMind in #14995
- docs: document unsupported webpack CLI options by @chenjiahan in #15017
- docs: improve webpack migration guidance by @chenjiahan in #15032
- docs: clarify webpack plugin migration by @chenjiahan in #15033
- docs(sources): add rspack_sources architecture guide by @SyMind in #15057
Other Changes
- chore(deps): update dependency @rslint/core to v0.7.2 by @renovate[bot] in #14936
- chore(deps): update dependency toml to ^4.3.0 by @renovate[bot] in #14942
- chore: remove obsolete pnpm configs by @chenjiahan in #14987
- chore: update shared Agent Skills by @chenjiahan in #14986
- chore: migrate Git hooks to Rstack CLI by @chenjiahan in #14989
- chore: migrate Rslint to Rstack CLI by @chenjiahan in #14990
- chore: migrate Rslib and Rsbuild to Rstack CLI by @chenjiahan in #14992
- chore: migrate Rstest and Rspress to Rstack CLI by @chenjiahan in #14998
- chore: replace migration skill with eco-ci debugger by @chenjiahan in #15009
- chore(deps): update dependency @rspress/core to ^2.0.19 by @renovate[bot] in #15029
- chore(deps): update dependency @rstest/adapter-rspack to ^0.11.5 by @renovate[bot] in #15031
- chore(deps): update dependency @module-federation/runtime-tools to v2.8.1 by @renovate[bot] in #15027
- chore(deps): update dependency @ast-grep/napi to ^0.45.0 by @renovate[bot] in #15030
- chore(deps): update dependency @rspack/lite-tapable to v1.1.5 by @renovate[bot] in #15028
- chore(deps): update github-actions by @renovate[bot] in #15026
- chore: modernize Renovate configuration by @chenjiahan in #15040
- chore(deps): update dependency memfs to v4.64.0 by @renovate[bot] in #15036
- chore(deps): update dependency source-map to ^0.8.0 by @renovate[bot] in #15037
- chore(deps): update dependency terser to v5.49.0 by @renovate[bot] in #15038
- chore(deps): update dependency ts-checker-rspack-plugin to ^1.6.0 by @renovate[bot] in #15039
- chore(renovate): group all npm patch updates by @chenjiahan in #15041
- chore(deps): update dependency less to v4.8.1 by @renovate[bot] in #15045
- chore(deps): update dependency markdown-to-jsx to ^9.10.1 by @renovate[bot] in #15046
- chore(deps): update dependency @rstest/core to ^0.11.5 by @renovate[bot] in #15044
- chore(deps): update dependency chalk to v6 by @renovate[bot] in #15043
- chore(deps): update patch npm dependencies by @renovate[bot] in #15042
- chore(build): enable createRequire parser in Rslib builds by @Timeless0911 in #15058
New Contributors
- @tusharsingh308 made their first contribution in #15016
- @lazerg made their first contribution in #15054
Full Changelog: v2.1.7...v2.1.8