What's Changed
Breaking Changes 🛠
- refactor!: remove default exports in hot modules by @Timeless0911 in #13213
Performance Improvements ⚡
- perf: by json-escape-simd by @SyMind in #13183
- perf: Add smallvec-backed member chains by @hardfist in #13227
- perf: improve find_new_name by @LingyuCoder in #13209
- perf(regex): enable case-insensitive endsWith fast path by @LingyuCoder in #13232
- perf: reduce replace source string alloc by @SyMind in #13150
- perf: improve data structure by @LingyuCoder in #13259
- perf(core): cache ModuleId hash by @LingyuCoder in #13264
- perf: use UkeySet or IdentifierSet for graph and plugin collections by @LingyuCoder in #13266
New Features 🎉
- feat(esm-library): auto-name unnamed dynamic import chunks with deterministic module name by @JSerFeng in #13172
- feat(deps): update @rspack/dev-server to 2.0.0-beta.1 by @chenjiahan in #13205
- feat: cjs require variable property access tree shaking by @ahabhgk in #13155
- feat: enable mangle exports for cjs full require by @ahabhgk in #13212
- feat(esm-library): deduplicate non-concatenated external modules after scope hoisting by @JSerFeng in #13210
- feat(esm): optimize dynamic import exports for namespace and tree-shaking by @JSerFeng in #13211
- feat: support regex flags and JavaScript lookaheads in extractComments condition by @Copilot in #12990
- feat(mf): shareScope support array type by @2heal1 in #13107
- feat: add Node.js version check during initialization by @chenjiahan in #13261
- feat: rsc support disable client api checks by @SyMind in #13263
- feat: update
devServertypes for@rspack/dev-serverv2 by @chenjiahan in #13278
Bug Fixes 🐞
- fix: revert lastCompilation check for stats by @hardfist in #13214
- fix(esm-library): fix dynamic import of same-chunk concatenated modules and external name deconfliction by @JSerFeng in #13220
- fix: Fix stats artifact fallback warning test to use stale stats by @hardfist in #13219
- fix: Remove DerefMut impl from ArcPath by @hardfist in #13235
- fix(defaults): make module rules regex case-sensitive by @LingyuCoder in #13238
- fix: dup external module declarations by @JSerFeng in #13231
- fix: merge exports info when merging external modules by @JSerFeng in #13257
- fix(create-rspack): update @rspack/dev-server to 2.0.0-beta.4 by @chenjiahan in #13268
- fix: avoid import duplicate identifiers by @JSerFeng in #13267
Refactor 🔨
- refactor: return empty artifact when access stats during artifact mutation by @hardfist in #13196
- refactor: cache regex patterns for performance by @LingyuCoder in #13217
- refactor: remove &mut Compilation in CompilationAddEntry hook by @hardfist in #13251
- refactor:
SourceSizeCachefor module size cache by @CPunisher in #13258 - refactor!: use
strictThisContextOnImportsto control ns obj as this by @ahabhgk in #13234 - refactor(core): reduce identifier hashing in hot paths by @hardfist in #13269
Document Updates 📖
- docs: fix html-rspack-plugin hook types of beforeEmit and afterEmit by @Gehbt in #13184
- docs: update devServer.proxy documentation for v2 by @chenjiahan in #13206
- docs: update webpack migration guide for minimizers by @chenjiahan in #13250
- docs(dev-server): improve static files configuration documentation by @chenjiahan in #13253
- docs: update descriptions to reflect refined webpack API by @chenjiahan in #13254
Other Changes
- chore(deps): update dependency @ast-grep/napi to ^0.41.0 by @renovate[bot] in #13188
- chore(deps): update patch npm dependencies by @renovate[bot] in #13186
- chore(ci): update rsdoctor actions by @yifancong in #13192
- chore: update codeowners and teams by @chenjiahan in #13207
- chore(deps): update dependency @module-federation/runtime-tools to v2 by @renovate[bot] in #13091
- chore(deps): update patch crates by @renovate[bot] in #13185
- chore: remove unused dependencies from root package.json by @chenjiahan in #13236
- test: remove defaults base snapshot alignment by @LingyuCoder in #13239
- chore(deps): update dependency cspell to ^9.7.0 by @renovate[bot] in #13246
- chore(deps): update dependency lint-staged to ^16.3.2 by @renovate[bot] in #13247
- chore(deps): update dependency case-police to ~2.2.0 by @renovate[bot] in #13245
- chore(deps): update rust crate cargo_toml to 0.22.3 by @renovate[bot] in #12538
- chore(deps): update rust crate oneshot to v0.1.12 [security] by @renovate[bot] in #12857
- chore: remove cargo build warning by @hardfist in #13255
- chore: lock file maintenance by @chenjiahan in #13256
- chore(ci): use cnpm mirror to setup node in self hosted mac by @stormslowly in #13233
- chore(deps): update dependency @rstest/core to ^0.9.1 by @renovate[bot] in #13244
Full Changelog: v2.0.0-beta.5...v2.0.0-beta.6