chore(deps): upgrade rspack to v2 - #10691
GiladShoham wants to merge 2 commits into
Conversation
Bump @rspack/core (1.7.7 -> 2.2.2), @rspack/dev-server (1.2.1 -> 2.2.1),
@rspack/plugin-react-refresh (1.6.0 -> 2.0.2), and rspack-manifest-plugin
(5.2.1 -> 5.2.2).
Config changes required by the migration:
- Remove `experiments: { css: true }` (now the default) from all rspack configs
- Drop `devServer.static.serveIndex` (removed from the dev-server type)
- Switch `@rspack/plugin-react-refresh` to its new named export
- Disable CSS `url()` resolution (`url: false`): rspack v2's CSS handler now
tries to resolve every `url()` as a module to read, which fails on the
absolute CDN font urls used by the design system with "Unhandled scheme".
Every `url()` in this graph is either an absolute CDN url or a data: URI,
so disabling resolution restores the v1 behavior with no effect on real
assets.
Verified with lint, this repo's `ui-start.e2e.ts` suite, and manual
`bit start --rebuild` runs against real temp workspaces/bare scopes in a
real browser (scope UI, workspace UI, and a live React component preview).
PR Summary by QodoUpgrade Rspack toolchain to v2
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
Code Review by Qodo
1. Formatting checks reject the new test
|
Disabling rspack's CSS `url()` resolution globally (to work around v2 throwing on the design system's absolute CDN font urls) would have silently broken any future first-party stylesheet using a local relative url(), since it'd never reach the asset pipeline. Split each style rule into a node_modules-scoped variant (url() disabled) and a first-party variant (default asset-pipeline resolution), so local relative urls keep resolving normally and only vendored CSS is exempted. Adds a regression test building a real rspack bundle from fixture stylesheets to prove both halves: a first-party relative url() gets emitted through the asset pipeline, and a vendored absolute url() is left untouched.
|
Code review by qodo was updated up to the latest commit a3cc141 |
Summary
@rspack/core1.7.7 → 2.2.2,@rspack/dev-server1.2.1 → 2.2.1,@rspack/plugin-react-refresh1.6.0 → 2.0.2,rspack-manifest-plugin5.2.1 → 5.2.2.experiments: { css: true }(now the default) from all 4 rspack configs.devServer.static.serveIndex(removed from the dev-server type) and switch@rspack/plugin-react-refreshto its new named export.url()resolution (url: false) in the shared CSS parser config: rspack v2's CSS handler now tries to resolve everyurl()as a module to read, which fails on the absolute CDN font urls used by the design system with "Unhandled scheme: https:". Everyurl()in this dependency graph is either an absolute CDN url or adata:URI, so disabling resolution restores v1's behavior with no effect on real local assets.Test plan
npm run lint(tsc + oxlint) passese2e/harmony/ui-start.e2e.ts(scope UI, workspace UI, SSR, asset serving, graphql, deep routes) — all 12 assertions passbit start --rebuildagainst real temp workspaces + bare scopes in a real browser: scope UI, workspace UI, and a live interactive React component preview (JSX + SCSS module) all render correctly with zero console errors