v2.1.0
v2.1.0
Release Notes
What's Changed
🎉 See Announcing Rspack 2.1 for more details.
New Features 🎉
- feat: expose module error JS API by @SyMind in https://github.com/web-infra-dev/rspack/pull/14351
- feat(cache): log persistent cache read and write timings by @hardfist in https://github.com/web-infra-dev/rspack/pull/14314
- feat(module_graph): expose
getProvidedExports()to JS API by @logonoff in https://github.com/web-infra-dev/rspack/pull/14349 - feat: support drop inactive branch dependencies for member expr by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/14382
- feat(runtime): introduce experimental.runtimeMode by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/14254
- feat: support branch guarded export presence for
inon ESM imports by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/14426 - feat: bump swc to support react compiler by @CPunisher in https://github.com/web-infra-dev/rspack/pull/14435
- feat(runtime): runtime internals of rspack runtime mode by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/14427
- feat(rsdoctor): expose export usage graph by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/14291
- feat: enable pureFunctions by default by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/14465
- feat(cache): add maxAge and maxGenerations for persistent cache cleanup by @matthewdavis-oai in https://github.com/web-infra-dev/rspack/pull/14296
- feat: make persistent cache max generations default to 3 by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/14534
- feat: rename persistent cache
maxGenerationstomaxVersionsby @ahabhgk in https://github.com/web-infra-dev/rspack/pull/14545 - feat: harden persistent cache version cleanup with typed version by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/14552
- feat: support riscv64 targets by @swwind in https://github.com/web-infra-dev/rspack/pull/14447
- feat(cache): make stale version cleanup fire-and-forget by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/14564
Performance 🚀
- perf: remove serde json by @SyMind in https://github.com/web-infra-dev/rspack/pull/14272
- perf: use mask intersects instead of flag iteration for scope globals by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14353
- perf: add ASCII fast path for dependency location column computation by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14355
- perf: force DFA automaton for real content hash scanning by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14356
- perf(core): reduce memcpy overhead by @hardfist in https://github.com/web-infra-dev/rspack/pull/14381
- perf: reduce flag dependency usage key allocations by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/14417
- perf: reduce build chunk graph preparation work by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/14421
- perf(sources): avoid cloning source maps with borrowed fields by @SyMind in https://github.com/web-infra-dev/rspack/pull/14380
- perf: optimize module concatenation traversal by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/14422
- perf(loader-runner): cache esm loader imports by @hardfist in https://github.com/web-infra-dev/rspack/pull/14434
- perf(core): optimize resource parsing by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14456
- perf(ci): drop redundant cargo check from rust CI by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14461
- perf: avoid JavaScriptTracer overhead when tracing is disabled by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14468
- perf(loader-runner): reduce loader object construction overhead by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14477
- perf: optimize compilation entrypoints getter by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14485
- perf: reduce asset wrapper overhead by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14487
- perf(deps): bump camino to 1.2.3 by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14519
- perf(ci): drop debuginfo from the whole ci profile by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14528
- perf(core): reduce source map serialization overhead by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14547
- perf(module-concat): prune readable identifier work by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/14537
- perf: reduce module ids assignment overhead by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/14553
Bug Fixes 🐞
- fix: preserve inline source content for transform sourcemaps by @intellild in https://github.com/web-infra-dev/rspack/pull/14350
- fix: remove webpackSource and webpackDefer magic comments by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/14364
- fix: apply global
overrideStrictfor ContextModule by @colinaaa in https://github.com/web-infra-dev/rspack/pull/14361 - fix(watcher): filter ignored-subtree events that emit a spurious folder change by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14329
- fix: use ChunkWithSizeInfo delimiter in maxInitialSize chunk naming fallback path by @wr40000 in https://github.com/web-infra-dev/rspack/pull/14331
- fix: wait for in-flight build before closing compiler by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14377
- fix(browser): point wasi-worker-browser export to dist file by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14415
- fix(tree-shaking): handle nested pure function calls by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/14375
- fix: cherry-pick mf manifest expose assets by @2heal1 in https://github.com/web-infra-dev/rspack/pull/14339
- fix: cache import.meta filename and dirname outside eval by @intellild in https://github.com/web-infra-dev/rspack/pull/14423
- fix(pure-functions): keep deferred pure import callees by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/14425
- fix: improve createRequire argument parsing by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/14424
- fix(rstest): preserve mocks in module chunk loading by @9aoy in https://github.com/web-infra-dev/rspack/pull/14472
- fix(rspack_watcher): prevent watch-root panic from orphaned path tree by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14448
- fix(test): isolate source for fixture-writing config cases by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14462
- fix: change default value of createRequire parsing to false by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/14482
- fix(types): align wasm loading types by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14506
- fix(split-chunks): align max size grouping with webpack by @intellild in https://github.com/web-infra-dev/rspack/pull/14481
- fix(rstest): fallback to automock for missing manual mocks by @9aoy in https://github.com/web-infra-dev/rspack/pull/14418
- fix(css): preserve undeclared css module idents by @intellild in https://github.com/web-infra-dev/rspack/pull/14497
- fix(mf): stabilize consume shared runtime output by @2heal1 in https://github.com/web-infra-dev/rspack/pull/14532
- fix(cache): default context_dependencies snapshot strategy to timestamp by @hardfist in https://github.com/web-infra-dev/rspack/pull/14490
- fix(core): support watcher events on native WatchFileSystem by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14404
- fix: default html script loading to module for module output by @intellild in https://github.com/web-infra-dev/rspack/pull/14544
- fix: parse preserved magic comments by @intellild in https://github.com/web-infra-dev/rspack/pull/14536
- fix: preserve source phase for wasm externals by @intellild in https://github.com/web-infra-dev/rspack/pull/14494
- fix: handle cjs export assignment side effects by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/14260
- fix(error): use theme-based styling instead of environment-sniffing
dim()in graphical renderer by @ruanyl in https://github.com/web-infra-dev/rspack/pull/14561 - fix: exclude for const/let in/of decl from hoisted decls by @swwind in https://github.com/web-infra-dev/rspack/pull/14287
- fix(types): align SWC unsafe function option by @haakjunlee in https://github.com/web-infra-dev/rspack/pull/14134
- fix(core): set rslib runtime chunk names by @Timeless0911 in https://github.com/web-infra-dev/rspack/pull/14575
- fix(core): exclude node_modules files from require.context map by @fi3ework in https://github.com/web-infra-dev/rspack/pull/14576
Refactor 🔨
- refactor(binding): consolidate module property definitions by @SyMind in https://github.com/web-infra-dev/rspack/pull/14365
- refactor: remove unused unresolved context from pure checks by @CPunisher in https://github.com/web-infra-dev/rspack/pull/14433
- refactor: merge webpack api parser plugins by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/14529
- refactor(core): remove unused TS exports by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14548
Document 📖
- docs: document source phase imports by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14360
- docs: fix optimization config types by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14370
- docs: document split chunks options by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14371
- docs: add Remotion to ecosystem by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14374
- docs: update magic comment version and anchors by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14378
- docs: update Vite comparison docs by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14412
- docs: update Rollup comparison docs by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14413
- docs: update rules use parallel type by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14416
- docs: add instructions for unsupported platforms by @swwind in https://github.com/web-infra-dev/rspack/pull/14442
- docs(website): fix Rspress summary style by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14449
- docs: improve incremental config docs by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14450
- docs: add GitHub to who is using by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14474
- docs: fix duplicate createRequire parser docs by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/14486
- docs: update React Compiler guide by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14496
- docs: remove redundant javascript/auto type examples by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14499
- docs: update ESM config examples by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14505
- docs: fix entry config docs by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14514
- docs: fix module config types by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14515
- docs: fix resolve config types by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14516
- docs: fix stats config types by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14518
- docs: document dev server options by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14523
- docs: move cache migration guide by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14535
- docs: improve cache option documentation by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14540
- docs: fix broken member links by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14563
Other Changes
- chore: release version 2.0.8 by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14345
- revert: "fix: temporarily revert JS parser changes causing runtime err" by @CPunisher in https://github.com/web-infra-dev/rspack/pull/14347
- chore: add scope hoisting regression for for-init references by @CPunisher in https://github.com/web-infra-dev/rspack/pull/14352
- chore(ci): update ecosystem ci action to v0.3.2 by @Timeless0911 in https://github.com/web-infra-dev/rspack/pull/14362
- chore(ci): use mini runner to offload lightweight CI jobs by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14363
- chore(ci): use mini runner for lint workflow by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14376
- chore(deps): group emnapi renovate updates by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14390
- chore(deps): update dependency terser-webpack-plugin to ^5.6.1 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14393
- test(wasm): skip file-dependencies-huge to fix flaky afterAll timeout by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14399
- chore(deps): update yarn to v4.16.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14396
- chore(deps): update dependency http-proxy-middleware to ^4.1.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14392
- chore(deps): update dependency rspack-merge to v1 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14397
- chore(deps): update dependency ts-checker-rspack-plugin to ^1.4.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14394
- chore(deps): update dependency @rslint/core to v0.6.1 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14391
- chore(deps): update dependency semver to ^7.8.4 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14408
- chore(deps): update pnpm to v11.6.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14409
- chore(deps): update dependency acorn to ^8.17.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14407
- chore(deps): update patch crates by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14385
- chore(deps): update patch npm dependencies by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14386
- chore(deps): update react and @rspack/plugin-preact-refresh by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14406
- chore: bump swc exp from 0.10.0 to 0.11.0 by @CPunisher in https://github.com/web-infra-dev/rspack/pull/14379
- chore(ci): split wasm release build into parallel wasi/browser jobs by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14414
- chore(deps): update emnapi to v1.11.1 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14395
- chore(deps): bump swc_ecma_minifier to 55.0.2 for template-literal minify fix by @pkasarda in https://github.com/web-infra-dev/rspack/pull/14428
- chore: speed up crate release pipeline by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14429
- chore(ci): use forked CodSpeed runner by @hardfist in https://github.com/web-infra-dev/rspack/pull/14432
- chore: limit walltime bench triggers by @hardfist in https://github.com/web-infra-dev/rspack/pull/14441
- chore: bump @rslint/core to 0.6.2 by @fansenze in https://github.com/web-infra-dev/rspack/pull/14470
- ci: disable debuginfo for the windows ci binding build by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14479
- chore: release v2.1.0-beta.0 by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/14480
- chore: remove codspeed js bench case by @SyMind in https://github.com/web-infra-dev/rspack/pull/14489
- test(tree-shaking): lock in pureFunctions innerGraph deferred-pure-check behavior by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/14488
- chore(ci): pause portable cache check by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14492
- chore(ci): align hookTimeout with testTimeout to fix flaky afterAll close timeout by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14498
- chore(deps): update dependency http-proxy-middleware to v4.1.1 [security] by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14500
- chore(deps): update dependency lint-staged to v17 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14504
- chore(deps): update pnpm to v11.8.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14503
- chore(deps): update dependency @rslib/core to ^0.23.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14501
- chore(deps): remove unused axios dependency by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14507
- chore(deps): update dependency enhanced-resolve to v5.24.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14512
- chore(deps): update dependency webpack-sources to v3.5.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14513
- chore(deps): bump rspack_resolver to 0.9.3 by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14521
- chore(deps): update patch npm dependencies by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14510
- chore(test): stabilize watch-detection on Windows with synchronous writes by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14520
- test: replace non_webpack_require in tests by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/14530
- chore: bump swc_core from 68 to 71 by @CPunisher in https://github.com/web-infra-dev/rspack/pull/14526
- ci: upgrade rstack-ecosystem-ci actions to v0.3.3 by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14542
- chore: walltime bench unbind to dedicated CPUs by @deanjingshui in https://github.com/web-infra-dev/rspack/pull/14543
- chore: add webpack gap tracking skill by @intellild in https://github.com/web-infra-dev/rspack/pull/14557
- chore: release version 2.1.0-rc.0 by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/14546
- chore: remove unused development commands by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14565
- chore(ci): report rust cache utilization per platform build by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14559
- chore(ci): set HOME for walltime bench codspeed runner install by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14569
- ci: keep reproduction label until close by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14570
- chore(skills): add release-blog-writer skill by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14571
- chore(ci): lift rust cache utilization by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14568
New Contributors
- @wr40000 made their first contribution in https://github.com/web-infra-dev/rspack/pull/14331
- @pkasarda made their first contribution in https://github.com/web-infra-dev/rspack/pull/14428
- @swwind made their first contribution in https://github.com/web-infra-dev/rspack/pull/14442
- @matthewdavis-oai made their first contribution in https://github.com/web-infra-dev/rspack/pull/14296
- @ruanyl made their first contribution in https://github.com/web-infra-dev/rspack/pull/14561
- @haakjunlee made their first contribution in https://github.com/web-infra-dev/rspack/pull/14134
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.0.8...v2.1.0