Skip to content

docs: publish verified Rsbuild React MF monorepo guide - #235

Merged
zackarychapple merged 7 commits into
mainfrom
agent/rsbuild-mf-monorepo-guide
Aug 3, 2026
Merged

docs: publish verified Rsbuild React MF monorepo guide#235
zackarychapple merged 7 commits into
mainfrom
agent/rsbuild-mf-monorepo-guide

Conversation

@zackarychapple

@zackarychapple zackarychapple commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Problem

The Rsbuild documentation needs one verified production path for a pnpm monorepo combining React, Module Federation, Zephyr remote dependencies, DTS diagnosis, watch behavior, and browser verification. The executable application must remain part of the canonical examples corpus rather than being maintained inside the documentation repository.

What this PR adds

  • A canonical Rsbuild + React + Module Federation monorepo guide covering new-project scaffolding and existing-project integration.
  • Complete host/header/hero configuration, explicit entries and remoteEntry.js, exposes, shared React singletons, assetPrefix: auto, TypeScript roots, released-Zephyr-compatible name@URL remotes, async bootstrap, and withZephyr() ordering.
  • Zephyr dependency examples for workspace:*, short and full UIDs, @production, and selector versus immutable version URLs.
  • Unique rsbuild-mf-monorepo-* application identities with explicit dependency UID mappings, while retaining the local Module Federation aliases header and hero.
  • Remote-first build ordering and separate Rsbuild web watch versus TAP publication-watch workflows.
  • Evidence-driven DTS diagnosis using rsbuild inspect, FEDERATION_DEBUG, .mf/typesGenerate.log, TYPE-001, and TS6059.
  • Browser and freshness verification guidance for manifests, remote entries, exposes, rendered Header/Hero content, console/network health, and a remote-only update.
  • Documentation CI that compares all 13 fenced guide blocks with an exact pinned zephyr-examples commit.

Canonical executable example

The application, lockfile, verification scripts, browser test, focused CI, root deployment assertions, and protected weekly live-publish workflow now live in ZephyrCloudIO/zephyr-examples#191 at module-federation/react-rsbuild-monorepo.

This PR intentionally does not contain an application fixture or live fixture workflow. Merge #191 first, then update the documentation workflow from commit c777c9fac419e674d16d8e608dc218c0e891e1e3 to the resulting commit on zephyr-examples/main before merging this PR.

Acceptance criteria

  • Distinguishes official scaffolding from integration into an existing app.
  • Covers complete remote and host configuration, async bootstrap, and explicit TypeScript roots.
  • Covers workspace:*, @production, short/full UIDs, and dependencyUrlMode.
  • Enforces remote-first, host-last build order.
  • Covers declared/locked/installed checks, rsbuild inspect, federation debug evidence, TYPE-001, and TS6059 reproduction.
  • Separates Rsbuild web watch from TAP-only publication watch.
  • Documents manifest, remote-entry, expose, rendering, browser-error, and remote-update verification.
  • Includes a symptom/stage/first-command/evidence troubleshooting matrix.
  • Verifies every fenced guide block against the pinned canonical example.
  • Keeps the executable example and live workflow out of the documentation repository.

Verification

  • RSBUILD_MF_EXAMPLES_ROOT=../zephyr-examples pnpm verify:rsbuild-mf-guide
  • pnpm lint
  • pnpm build
  • git diff --check

The canonical example separately passed:

  • pnpm install --frozen-lockfile
  • pnpm verify:scaffold
  • pnpm verify
  • pnpm verify:browser
  • ZE_FAIL_BUILD=true pnpm run build with authenticated live Zephyr deployments

Local verification used Node 26.4.0 and emitted the expected engine warning; both repositories pin Node 24 in CI.

This PR is based on current documentation main and does not depend on module-federation/core#4947.

Closes #236

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

Preview Environment Deactivated!

Name Status URL
zephyr-cloud-docs ❌ Deactivated https://zackary-chapple-16028-zephyr-cloud-docs-zephyr-do-7bede1d... ↗

Details:

  • Latest Commit: 6d20246
  • Deactivated: 8/3/2026, 4:44:37 AM

@zackarychapple
zackarychapple marked this pull request as ready for review July 29, 2026 18:59
@zackarychapple
zackarychapple enabled auto-merge (squash) July 30, 2026 20:29
Comment thread fixtures/rsbuild-react-mf-monorepo/apps/header/src/Header.tsx Outdated
@zackarychapple
zackarychapple merged commit 72eb483 into main Aug 3, 2026
6 checks 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.

docs(rsbuild): add an end-to-end Zephyr Module Federation monorepo guide

2 participants