Repository navigation
chore(deps): move the repo to @rspack/core 2 - #5126
Conversation
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Deploying with ☁️ Zephyr CloudThe latest preview deployments for this pull request.
Affected deployment targets
|
@module-federation/devtools
@module-federation/cli
create-module-federation
@module-federation/dts-plugin
@module-federation/enhanced
@module-federation/error-codes
@module-federation/esbuild
@module-federation/managers
@module-federation/manifest
@module-federation/metro
@module-federation/metro-plugin-rnc-cli
@module-federation/metro-plugin-rnef
@module-federation/metro-plugin-rock
@module-federation/modern-js
@module-federation/modern-js-v3
@module-federation/native-federation-tests
@module-federation/native-federation-typescript
@module-federation/nextjs-mf
@module-federation/node
@module-federation/observability-plugin
@module-federation/playground
@module-federation/retry-plugin
@module-federation/rsbuild-plugin
@module-federation/rspack
@module-federation/rspress-plugin
@module-federation/rstest
@module-federation/runtime
@module-federation/runtime-core
@module-federation/runtime-tools
@module-federation/sdk
@module-federation/storybook-addon
@module-federation/third-party-dts-extractor
@module-federation/treeshake-frontend
@module-federation/treeshake-server
@module-federation/typescript
@module-federation/utilities
@module-federation/webpack-bundler-runtime
@module-federation/bridge-react
@module-federation/bridge-react-webpack-plugin
@module-federation/bridge-shared
@module-federation/bridge-vue3
@module-federation/inject-external-runtime-core-plugin
commit: |
Bundle Size Report13 package(s) changed, 30 unchanged. Package dist + ESM entry
Bundle targets
Consumer scenarios
Total dist (raw): 23.41 MB (-625 B (-0.0%)) Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as |
# Conflicts: # pnpm-lock.yaml
Why
The runtime pruning RFC reads
compiler.platform, which only exists in Rspack 2. The repo still develops and tests@module-federation/rspackagainst@rspack/core1.3.9, so that work cannot be built or tested here. This PR moves the repo's own toolchain to Rspack 2. It does not change what users may install: the@rspack/corepeer range of@module-federation/rspackstays^0.7.0 || ^1.0.0 || ^2.0.0-0.Version
@rspack/coreand@rspack/cli2.1.10, the newest patch on the 2.1 line. The rstack packages in the repo are on Rspack 2.1:@rsbuild/core2.1.4 depends on@rspack/core~2.1.2, and@rstest/core0.11.6 pulls@rsbuild/core2.1.10, which depends on~2.1.8. Both ranges accept 2.1.10, so the lockfile keeps a single Rspack 2.1 copy. Rspack 2.2.x (latest 2.2.7) is outside both ranges and would need an@rsbuild/core2.2 bump.Bumps
devDependencies:@rspack/coreand@rspack/cli1.3.9 to 2.1.10.@rspack/dev-server1.1.1 to 2.2.1, because@rspack/cli2 no longer installs the dev server and peers on@rspack/dev-server2.packages/rspackdevDependencies:@rspack/core^1.0.2to2.1.10.apps/manifest-demo/3010-rspack-provider:@rspack/core^1.0.2to2.1.10. The 3011 and 3012 providers andreact-ts-remoteuse the root copy.Other packages are unchanged.
packages/modernjs-v3already pins@rspack/core2.0.6.Lockfile side effects:
@rsbuild/core2.1.x consumer now resolves@rspack/core2.1.10 instead of 2.1.8 or 2.1.2. Both are within their ranges.@module-federation/runtime-toolsand its dependencies that the rstack packages peer on moved from 2.9.0 to 2.9.1. This matches the workspace version.@rspack/core1.3.9, 2.1.2, 2.1.8, and the dev server 1.x dependency tree are gone.Fallout and fixes
packages/rspackandpackages/rsbuild-pluginneeded no source changes. Both type-check and build against Rspack 2.1.10. All fallout was in app configs:3010-rspack-providersetexperiments.css: true, which Rspack 2 removed. The build failed onstuff.module.csswith a JavaScript parse error. The fix replaces the option with a{ test: /\.css$/, type: 'css/auto' }rule, as the migration guide prescribes.rspack servein@rspack/cli2 enableslazyCompilation: { imports: true }for web targets when the config does not set it. In a remote, the lazy-compilation proxy sends its request to the page origin. For a remote, the page origin is the host, so the request returns HTTP 404 ("Problem communicating active modules to the server"). This failed the manifest dev e2e (preload.cy.ts) when the host loaded the 3011 and 3012 providers. The fix setslazyCompilation: falsein the four remotes built withrspack serve: 3010, 3011, 3012, andreact-ts-remote. No CI job servesreact-ts-remote; it gets the same fix becausepnpm app:ts:devhits the same 404.Testing
On 2.1.10:
pnpm exec turbo run build --filter=@module-federation/rspack... --filter=@module-federation/enhanced... --filter=@module-federation/rsbuild-plugin...: 17 of 17 tasks passed.tsc --noEmit -p packages/rspack/tsconfig.lib.json: no errors.pnpm --filter @module-federation/rspack run test: 6 of 6 tests passed.pnpm --filter @module-federation/rsbuild-plugin run test: 39 of 39 tests passed.pnpm run ci:local --only=e2e-manifest: exit 0. The dev e2e passed 8 of 8 specs, and the prod e2e passed 8 of 8.On 2.1.8, the first revision of this PR:
prepare-node20-compat-packages.mjsandverify-node20-compat.mjsran on Node 20.19.0 with the exact-version guard removed, because 20.19.5 was not installed locally. The fixture ranbuild:rspacksuccessfully. All 37 tarballs verified.Not tested
@rsbuild/core, which now resolves Rspack 2.1.10. CI reruns them on this revision.packages/modernjs-v3tests were not run. That package pins its own@rspack/core2.0.6.build-and-testjob was not run locally.Changeset
None. This PR changes only devDependencies, private apps, and the lockfile. No published package changes its behavior or its peer range.
Known leftovers
pnpm installwarns that root@swc/helpers0.5.13 does not satisfy the^0.5.23peer of@rspack/core2.1.x.modernjs-v3already has the same warning with 0.5.17. The builds above pass.@module-federation/rspackwho serve a remote withrspack servefrom@rspack/cli2 hit the same lazy-compilation 404. The fix here covers only the demo apps. Supporting lazy compilation in remotes is tracked in Lazy compilation fails in remotes served with rspack serve (Rspack 2) #5129.TYPE-001, because its tsconfig referencestypings/cssmodule.d.tsandtypings/image.d.ts, and neither file exists. The cause does not depend on the Rspack version, and the error does not fail the build.