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