Skip to content

feat(nx-rspack-mf): swap Nx boilerplate for Zephyr splash + MF live demo#172

Open
billwatson017 wants to merge 2 commits intomainfrom
feat/nx-mf-splash-page
Open

feat(nx-rspack-mf): swap Nx boilerplate for Zephyr splash + MF live demo#172
billwatson017 wants to merge 2 commits intomainfrom
feat/nx-mf-splash-page

Conversation

@billwatson017
Copy link
Copy Markdown
Contributor

Summary

Replaces the stock Nx scaffolding page in build-systems/nx-rspack-mf with the canonical ZephyrWelcome splash used by other examples, and adds a live Module Federation demo section between the "Get your own copy in seconds" block and the deployment pipeline explainer.

What changed

  • Host splashnx-welcome.tsx deleted; app.tsx renders ZephyrWelcome with Nx + Rspack + MF metadata (title, logos, pills).
  • Routing removed — single-page splash, no more /remote1 / /remote2 routes. BrowserRouter dropped from bootstrap.tsx. Main bundle shrinks by ~300 KiB.
  • ZephyrWelcome extension — new optional mid?: ReactNode prop renders into a shadow-DOM slot via createPortal. Backward-compatible — other examples pass nothing, nothing changes for them.
  • FederationDemo component — two accent-colored boundary cards (amber for remote1, violet for remote2) with toggle pills that mount/unmount each remote live. Viewers can watch DevTools → Network for remoteEntry.js requests while clicking.
  • Remotes upgradedremote1 becomes a "Catalog Team" product listing (amber theme); remote2 becomes an "Activity Team" feed (violet theme). Both use inline styles so they work standalone and embedded.

Live demo

https://bill-watson-eh3huzb2he-625-mf-nx-rspack-host-zeph-4e6ec094f-ze.zephyrcloud.app

Test plan

  • pnpm install && pnpm build in build-systems/nx-rspack-mf/ deploys all 3 apps
  • Splash loads with Nx + Rspack + Zephyr logos and the correct pnpm dlx degit command
  • "Get your own copy in seconds" appears directly below the hero
  • Module Federation — Live section appears below the quick-start
  • Both toggle pills default to visible; clicking unmounts/remounts the respective remote
  • When both pills are off, empty-state message shows
  • Remote cards show accent-colored dashed borders with badge + live indicator, no visual clipping
  • Pipeline, features, CTA, cards, footer render below the MF section

billwatson017 and others added 2 commits April 20, 2026 16:07
Replace the stock Nx scaffolding page with the canonical ZephyrWelcome
splash used by other examples, and showcase Module Federation with a
live in-page demo section rendered between the quick-start and pipeline
blocks.

Changes:

- host: drop nx-welcome.tsx; app.tsx now renders ZephyrWelcome with
  Nx + Rspack + MF metadata (title, logos, pills)
- host: remove react-router-dom routing — single-page splash. Drops
  BrowserRouter from bootstrap.tsx. Main bundle shrinks ~300 KiB.
- host: ZephyrWelcome gains an optional `mid` prop that renders
  children into a shadow-DOM slot via createPortal. Backward-compatible;
  other examples unaffected.
- host: new FederationDemo.tsx — shows two accent-colored boundary
  cards (amber for remote1, violet for remote2) with toggle pills that
  mount/unmount each remote live. Explainer strip directs viewers to
  watch Network for remoteEntry.js requests.
- remote1: upgrade from placeholder to a "Catalog Team" product listing
  (amber theme) with inline styles so it works standalone and embedded.
- remote2: upgrade to a "Activity Team" feed (violet theme).

Verified: pnpm build deploys all three apps; live URL shows splash +
toggleable federated remotes + pipeline explainer.
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.

1 participant