Skip to content

feat(rsc): register federation manifest data at runtime#13215

Draft
ScriptedAlchemy wants to merge 22 commits into
cursor/rsc-federation-module-patterns-42fdfrom
cursor/rsc-module-federation-registration-0f08
Draft

feat(rsc): register federation manifest data at runtime#13215
ScriptedAlchemy wants to merge 22 commits into
cursor/rsc-federation-module-patterns-42fdfrom
cursor/rsc-module-federation-registration-0f08

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add the host-side mf-rsc-registration-runtime-plugin.js that reads manifest RSC metadata and registers it into __webpack_require__.rscM
  • Stage manifest payloads from runtime hooks, install virtual modules for exposed/shared references and actions, and refresh registration state deterministically
  • Add runtime-plugin verification coverage and keep this PR scoped to consuming manifest data that already exists in the earlier stack PRs

Stack

Current stack, bottom to top:

  • #12977 feat(mf): layer-aware sharing and runtime scope-array support
  • #13203 feat(mf): emit RSC metadata in federation manifests
  • #13204 feat(rsbuild): add RSC federation host/remote example
  • #13208 feat(rsbuild): add RSC federation module patterns
  • #13215 feat(rsc): register federation manifest data at runtime <- this PR

Why This PR Exists

This is the runtime integration step for the stack. It consumes the manifest contract from #13203 and the example surface from #13204 and #13208, and registers federated RSC references at runtime without leaking __webpack_require__ globally.

References

  • Manifest producer contract: #13203

@cursor

cursor Bot commented Mar 5, 2026

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing 0692ec7 to chore(ci): eco benchmark compare base optimize (#13360) by pshu

❌ Size increased by 115.00KB from 49.01MB to 49.12MB (⬆️0.23%)

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Mar 5, 2026

Copy link
Copy Markdown

Deploying rspack with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0692ec7
Status: ✅  Deploy successful!
Preview URL: https://69762926.rspack-v2.pages.dev
Branch Preview URL: https://cursor-rsc-module-federation.rspack-v2.pages.dev

View logs

@ScriptedAlchemy ScriptedAlchemy changed the title Rsc module federation registration feat(rsc): register federation manifest data at runtime Mar 5, 2026
@github-actions github-actions Bot added the release: feature release: feature related release(mr only) label Mar 5, 2026
@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Change
react-10k 5.7 MB 0
react-1k 826.2 KB 0
react-5k 2.7 MB 0
rome 984.2 KB 0
ui-components 2.3 MB 0

Generated by Rsdoctor GitHub Action

@ScriptedAlchemy ScriptedAlchemy force-pushed the cursor/rsc-federation-module-patterns-42fd branch from 1229d8d to 75f3aee Compare March 6, 2026 00:19
@ScriptedAlchemy ScriptedAlchemy force-pushed the cursor/rsc-module-federation-registration-0f08 branch from 8f0f9ac to 0d5acf9 Compare March 6, 2026 00:21
@codspeed-hq

codspeed-hq Bot commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 16 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing cursor/rsc-module-federation-registration-0f08 (0692ec7) with cursor/rsc-federation-module-patterns-42fd (a9cb9e8)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@ScriptedAlchemy ScriptedAlchemy force-pushed the cursor/rsc-module-federation-registration-0f08 branch 2 times, most recently from 2fec966 to 9f9f5e9 Compare March 6, 2026 02:11
@ScriptedAlchemy ScriptedAlchemy force-pushed the cursor/rsc-federation-module-patterns-42fd branch 2 times, most recently from 730a705 to ef02e4b Compare March 6, 2026 03:23
@ScriptedAlchemy ScriptedAlchemy force-pushed the cursor/rsc-module-federation-registration-0f08 branch from 9f9f5e9 to 7ae73e7 Compare March 6, 2026 03:23
@ScriptedAlchemy ScriptedAlchemy force-pushed the cursor/rsc-federation-module-patterns-42fd branch from ef02e4b to 781ad0a Compare March 6, 2026 04:54
@ScriptedAlchemy ScriptedAlchemy force-pushed the cursor/rsc-module-federation-registration-0f08 branch from 7ae73e7 to d655439 Compare March 6, 2026 04:54
ScriptedAlchemy and others added 12 commits March 8, 2026 00:09
…terns-42fd' into cursor/rsc-module-federation-registration-0f08

# Conflicts:
#	examples/rsbuild-rsc-federation/e2e/app.spec.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: feature release: feature related release(mr only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants