feat: upgrade Rspack to 2.2.1 and matching swc toolchain - #359
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
DakEnviy
reviewed
Sep 14, 2026
| "overrides": { | ||
| "@swc/types": "0.1.28", | ||
| "@rsdoctor/rspack-plugin": "1.6.1", | ||
| "@rsdoctor/webpack-plugin": "1.6.1", |
DakEnviy
approved these changes
Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
@rspack/core2.1.22.2.1@rspack/dev-server^2.1.0^2.2.1@swc/core1.15.431.16.1@swc/plugin-transform-imports12.14.113.0.0@rsdoctor/{rspack,webpack}-plugin1.6.1(exact)^1.6.4Also dropped the
@rsdoctor/*entries frompnpm.overrides.Why
Rspack 2.2.x embeds
swc_core77, so the swc toolchain has to move with it. Per the swc plugin compat range for 3012:2.2.0–2.2.3↔@swc/core1.16.0–1.16.1↔@swc/plugin-transform-imports13.0.0That is why
@swc/coreis pinned at1.16.1and not the newer1.16.2(already onswc_core78), and why the wasm plugin is13.0.0and not14.0.0— a mismatched wasm plugin fails to load at build time.The remaining rspack-adjacent deps (
@rspack/plugin-react-refresh,ts-checker-rspack-plugin,rspack-manifest-plugin,worker-rspack-loader,swc-loader,@swc/cli) are already on caret ranges resolving to their latest versions, and all declare@rspack/corepeers that accept^2— no manifest change needed.Rsdoctor
Bumped to 1.6.4 alongside Rspack, and relaxed from an exact pin:
pnpm.overridesentries were no-ops — nothing in the tree depends on rsdoctor transitively, only our own direct deps, andpnpm.overridesis not published to consumers.@rsdoctor/core|sdk|graph|types|utilsto its own exact version.dependenciesof a published library forces a duplicate install on any consumer that also depends on rsdoctor.Reviewer notes
rsdoctorConfigtype insrc/common/models/index.tsis derived from theRsdoctorRspackPluginconstructor options, so a future rsdoctor minor can shift app-builder's emitted.d.ts. Inside this repo the lockfile pins it; happy to restore the exact pin if that trade-off isn't wanted.@statoscope/webpack-stats-extension-package-infopeer warning (unmet peer @rspack/core@^1.0.0: found 2.2.1) is pre-existing — statoscope already didn't declare rspack 2.x support before this PR.Verification
pnpm typecheck— passespnpm test— 49/49 passingexamples/ssr(bundler: 'rspack') builds successfully against 2.2.1@swc/plugin-transform-imports@13.0.0wasm plugin actually loads and transforms under@swc/core@1.16.1🤖 Generated with Claude Code