Skip to content

Module federation rsc build#2

Merged
ScriptedAlchemy merged 248 commits into
cursor/module-federation-rsc-example-16ddfrom
cursor/module-federation-rsc-build-a6af
Feb 18, 2026
Merged

Module federation rsc build#2
ScriptedAlchemy merged 248 commits into
cursor/module-federation-rsc-example-16ddfrom
cursor/module-federation-rsc-build-a6af

Conversation

@ScriptedAlchemy
Copy link
Copy Markdown
Owner

Summary

Stabilizes the Module Federation + RSC integration test (tests/integration/rsc-mf) to pass in both development and build modes. This resolves the TypeError: __webpack_modules__[e] is not a function in build mode and ensures remote server actions are executed on the host process via Module Federation.

Key changes include:

  • Reworked action routing to align with module-federation/node/runtimePlugin and RSC bridge semantics, ensuring remote actions are proxied and executed on the host.
  • Removed brittle workarounds such as host build-time chunk copy/patching and action ID remap middleware.
  • Ensured host-resolvable action IDs are used for remote callbacks.

Related Links

Checklist

  • I have added changeset via pnpm run change.
  • I have updated the documentation.
  • I have added tests to cover my changes.

Open in Cursor Open in Web

@cursor
Copy link
Copy Markdown

cursor Bot commented Feb 13, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 13, 2026

🦋 Changeset detected

Latest commit: 494d849

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 112 packages
Name Type
@modern-js/builder Patch
@modern-js/plugin-bff Patch
@modern-js/server Patch
@modern-js/app-tools Patch
@modern-js/plugin Patch
rsc-mf-host Patch
rsc-mf-remote Patch
rsc-ssr-app Patch
bff-api-app Patch
bff-client-app Patch
bff-indep-client-app Patch
bff-hono Patch
deploy-server Patch
pure-esm-project Patch
@module-federation/modern-js-v3 Patch
@modern-js/plugin-ssg Patch
@modern-js/plugin-styled-components Patch
@modern-js/plugin-i18n Patch
@modern-js/image Patch
@modern-js/runtime Patch
@modern-js/plugin-polyfill Patch
@integration-test/alias-set Patch
app-document Patch
async-entry-test Patch
tmp Patch
integration-clean-dist-path Patch
integration-compatibility Patch
integration-custom-dist-path Patch
custom-file-system-entry Patch
integration-custom-template Patch
deploy Patch
dev-server Patch
integration-disable-html Patch
entries-app-builder Patch
app-custom-entries Patch
app-custom-routes-runtime Patch
app-custom Patch
app-entry Patch
app-route Patch
app-entry-server Patch
i18n-app-csr-html-lang Patch
i18n-app Patch
i18n-app-ssr-html-lang Patch
i18n-app-ssr Patch
i18n-custom-i18n-wrapper Patch
i18n-mf-app-provider Patch
i18n-mf-component-provider Patch
i18n-mf-consumer Patch
i18n-routes Patch
i18n-routes-ssr Patch
@integration-test/image-component Patch
main-entry-name Patch
nonce Patch
routes-match Patch
routes Patch
app-rsbuild-hooks Patch
rsc-csr-app Patch
rsc-csr-routes Patch
rsc-ssr-routes Patch
runtime-custom-plugin Patch
runtime-custom-config-plugin Patch
select-mul-entry-test Patch
select-one-entry-test Patch
server-config Patch
server-json-script Patch
server-monitors Patch
server-prod Patch
server-routes Patch
@source-code-build/app Patch
ssg-fixtures-mega-list-routes Patch
ssg-fixtures-nested-routes Patch
ssg-fixtures-simple Patch
ssg-fixtures-web-server Patch
ssr-base-async-entry-test Patch
ssr-base-json-test Patch
ssr-base-test Patch
ssr-base-fallback-test Patch
init Patch
ssr-base-loadable Patch
ssr-partial-test Patch
ssr-script-loading Patch
ssr-streaming-inline-test Patch
ssr-streaming-test Patch
styled-components-stream Patch
styled-components-string Patch
integration-tailwindcss-v2 Patch
integration-tailwindcss-v3 Patch
integration-tailwindcss-v4 Patch
tmp-dir Patch
write-to-dist Patch
@modern-js/bundle-diff-benchmark Patch
@modern-js/main-doc Patch
@modern-js/tsconfig Patch
@modern-js/plugin-data-loader Patch
@modern-js/render Patch
@modern-js/bff-core Patch
@modern-js/bff-runtime Patch
@modern-js/server-core Patch
@modern-js/create-request Patch
@modern-js/prod-server Patch
@modern-js/server-runtime Patch
@modern-js/server-utils Patch
@modern-js/create Patch
@modern-js/i18n-utils Patch
@modern-js/runtime-utils Patch
@modern-js/sandpack-react Patch
@modern-js/types Patch
@modern-js/utils Patch
@modern-js/rslib Patch
@scripts/prebundle Patch
@scripts/rstest-config Patch
@scripts/release-node Patch

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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 13, 2026

Rsdoctor Bundle Diff Analysis

📊 Quick Summary
Project Total Size Change
bundle-diff 2.9 MB +6.0 B (0.0%)
📋 Detailed Reports (Click to expand)

📁 bundle-diff

Path: benchmark/bundle-diff/dist/rsdoctor-data.json

📌 Baseline Commit: 7eb41c50e6 | PR: #8351

Metric Current Baseline Change
📊 Total Size 2.9 MB 2.9 MB +6.0 B (0.0%)
📄 JavaScript 499.7 KB 499.7 KB 0
🎨 CSS 1.2 KB 1.2 KB 0
🌐 HTML 1.6 KB 1.6 KB 0
📁 Other Assets 2.4 MB 2.4 MB +6.0 B (0.0%)

📦 Download Diff Report: bundle-diff Bundle Diff

Generated by Rsdoctor GitHub Action

@cursor cursor Bot marked this pull request as ready for review February 13, 2026 22:08
cursoragent and others added 29 commits February 14, 2026 15:48
….1 (main) (web-infra-dev#8350)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: caohuilin <caohuilin@bytedance.com>
…nfra-dev#8351)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: caohuilin <caohuilin@bytedance.com>
…ion-rsc-build-a6af

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	pnpm-lock.yaml
Co-authored-by: Cursor <cursoragent@cursor.com>
Move MF async-startup bundle handling behind a generic server-core loader strategy hook and register the MF implementation from modernjs-v3, so core stays plugin-agnostic for containment/migration. Also switch RSC action error bodies to development-only detail and add boundary contract tests to lock this behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid calling string methods on non-string remote `external` values while replacing localhost URLs, so object remotes without an external string no longer throw at runtime.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ScriptedAlchemy ScriptedAlchemy merged commit 23160ec into cursor/module-federation-rsc-example-16dd Feb 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants