Repository navigation
fix(ssr): emit public path for Modern and Rslib Node runtimes - #5212
Merged
2heal1 merged 2 commits intoOct 22, 2026
Merged
Conversation
🦋 Changeset detectedLatest commit: 01916a9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 48 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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. |
@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: |
3 tasks done
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.
Modern and Rslib SSR producers can omit
__webpack_require__.pbecause Rspack's native async-node filesystem loader does not require publicPath. The MF Node runtime loads asynchronous chunks over HTTP and needs the configured server base URL.Add a shared
SSRPublicPathPluginin rsbuild-plugin utilities that declares the publicPath runtime requirement throughadditionalTreeRuntimeRequirements. Rspack generates the assignment from its output configuration. Apply it to Rsbuild/Rslib Node and dual/SSR builds and reuse it in the existing Modern v3 adapter. Keep browser builds and static asset URL handling unchanged.Add real Rslib Node/dual build regressions, a Modern async-node output regression, and changesets for both packages.
Validation on Node 24:
pnpm exec turbo run build --filter=@module-federation/modern-js-v3 --filter=@module-federation/rsbuild-plugin— passedpnpm --filter @module-federation/rsbuild-plugin test— 42 tests passedpnpm --filter @module-federation/modern-js-v3 test— 25 tests passedpnpm exec prettier --check .— passedloaded-first: dynamic Rslib and dynamically nested Rslib routes both return expected content in raw production SSR HTML. The producer runtime reports an absolute/ssr/publicPath and no longer takes the manifest-entry fallback for its chunks.PUPPETEER_EXECUTABLE_PATH='/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' pnpm exec rstest -c rstest.config.mts --reporter verbose— 7 files, 87 tests passed in 3m 35s. Covers development/production rendering, hydration, assets, data fetching, remote replacement, failures/recovery and legacy activation. Original assertions were retained. Only the copied test fixture's dependency-root path was adjusted for the isolated installation.The complete integration run uses installed Chrome and clean Core package artifacts without diagnostic instrumentation.
Full Core workspace tests were not run because the change is limited to these build integration packages. No publish or merge was performed.
Target
feat/enhanced-runtime-unification.