feat(nx-rspack-mf): swap Nx boilerplate for Zephyr splash + MF live demo#172
Open
billwatson017 wants to merge 2 commits intomainfrom
Open
feat(nx-rspack-mf): swap Nx boilerplate for Zephyr splash + MF live demo#172billwatson017 wants to merge 2 commits intomainfrom
billwatson017 wants to merge 2 commits intomainfrom
Conversation
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.
7 tasks
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.
Summary
Replaces the stock Nx scaffolding page in
build-systems/nx-rspack-mfwith the canonicalZephyrWelcomesplash 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
nx-welcome.tsxdeleted;app.tsxrendersZephyrWelcomewith Nx + Rspack + MF metadata (title, logos, pills)./remote1//remote2routes.BrowserRouterdropped frombootstrap.tsx. Main bundle shrinks by ~300 KiB.ZephyrWelcomeextension — new optionalmid?: ReactNodeprop renders into a shadow-DOM slot viacreatePortal. Backward-compatible — other examples pass nothing, nothing changes for them.FederationDemocomponent — two accent-colored boundary cards (amber forremote1, violet forremote2) with toggle pills that mount/unmount each remote live. Viewers can watch DevTools → Network forremoteEntry.jsrequests while clicking.remote1becomes a "Catalog Team" product listing (amber theme);remote2becomes 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 buildinbuild-systems/nx-rspack-mf/deploys all 3 appspnpm dlx degitcommand