Skip to content

feat(examples): expose Bridge export-app from Nuxt remote - #21

Open
tonoizer wants to merge 4 commits into
module-federation:mainfrom
tonoizer:feat/bridge-export-app
Open

feat(examples): expose Bridge export-app from Nuxt remote#21
tonoizer wants to merge 4 commits into
module-federation:mainfrom
tonoizer:feat/bridge-export-app

Conversation

@tonoizer

@tonoizer tonoizer commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remote exposes ./bridge/export-app via createBridgeComponent (small vue-router app under app/bridge/).
  • Host mounts it at /bridge/:pathMatch(.*)* with createRemoteAppComponent (ClientOnly island).
  • Slashed expose name so manifest discovery does not register a Bridge factory as RemoteExportApp.
  • Component federation demos on / unchanged.
  • Docs: package README recipe + example READMEs.

Plan (Bridge meta-framework remotes)

Same Bridge remote should load in Nuxt and React/Next without a second build. Split across:

Step PR Role
1 module-federation/core#4984 bridge-vue3 basename (explicit + Nuxt catch-alls)
2 This PR Nuxt examples: expose + host /bridge
3 module-federation/core#4988 Docs: Nuxt / Next / Modern.js host recipes

SSR: module-federation/core#4869 (separate). This PR is CSR Bridge only.

Testing

  • pnpm --filter @module-federation/nuxt build
  • pnpm --filter nuxt-remote typecheck
  • pnpm --filter nuxt-host typecheck

Risks

  • Host now uses Nuxt pages (NuxtPage); existing e2e that hit / should still see component cards.
  • bridge-vue3 peers vue-router@4 while Nuxt 4 uses v5 — runtime APIs used here overlap; watch peer warnings.
  • Basename today relies on Vue :pathMatch(.*)* catch-all; explicit basename lands with core#4984.

Non-goals

  • No Bridge SSR, no new Nuxt module APIs, no React host demo in this repo.

tonoizer and others added 2 commits August 11, 2026 19:56
Add a minimal createBridgeComponent export on the remote and a host
catch-all under /bridge so the same app-level remote can be loaded
alongside existing component federation.

Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid host manifest discovery registering the Bridge factory as
RemoteExportApp by exposing ./bridge/export-app instead of ./export-app.

Co-authored-by: Cursor <cursoragent@cursor.com>
Point hosts at pathMatch catch-alls for current bridge-vue3 and link
core#4984 for the upcoming explicit basename API.

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

pkg-pr-new Bot commented Aug 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@module-federation/nuxt@21

commit: 0d96c99

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