Skip to content

fix(bridge-vue3): derive basename for Nuxt catch-alls - #4984

Open
tonoizer wants to merge 5 commits into
module-federation:mainfrom
tonoizer:feat/bridge-vue3-basename
Open

fix(bridge-vue3): derive basename for Nuxt catch-alls#4984
tonoizer wants to merge 5 commits into
module-federation:mainfrom
tonoizer:feat/bridge-vue3-basename

Conversation

@tonoizer

@tonoizer tonoizer commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add optional explicit basename on createRemoteAppComponent (mirrors React Bridge host override).
  • Derive basename from Vue Router and Nuxt-style catch-alls (:pathMatch(.*)*, :path(.*)*, nested last match).
  • Unit tests + changeset (minor).

Plan (Bridge meta-framework remotes)

Minimal track so one Bridge export-app loads in Nuxt and React/Next/Modern hosts (CSR). SSR stays on #4869.

Step PR Role
1 This PR bridge-vue3 basename (foundation)
2 module-federation/nuxt#21 Nuxt demo: remote ./bridge/export-app + host /bridge
3 #4988 Docs: meta-framework host recipes

Out of scope here / later: Bridge SSR Nuxt/Modern adapters (#4869), dedicated bridge-nuxt package.

Testing

  • pnpm exec turbo run build --filter=@module-federation/bridge-vue3...
  • pnpm --filter @module-federation/bridge-vue3 test (64+ passed)

Risks

  • Low: auto-detect change only affects hosts whose catch-all was previously mis-derived; explicit basename is additive.

Non-goals

  • No SSR, Nuxt module, or demos (see linked follow-ups).

Allow explicit basename on createRemoteAppComponent and strip Vue/Nuxt
catch-all route patterns so meta-framework hosts mount remotes under the
correct prefix.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 40c11f7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 48 packages
Name Type
@module-federation/bridge-vue3 Major
@module-federation/runtime Major
@module-federation/enhanced Major
@module-federation/rspack Major
@module-federation/webpack-bundler-runtime Major
@module-federation/sdk Major
@module-federation/runtime-tools Major
@module-federation/managers Major
@module-federation/manifest Major
@module-federation/dts-plugin Major
@module-federation/third-party-dts-extractor Major
@module-federation/devtools Major
@module-federation/bridge-react Major
@module-federation/bridge-shared Major
@module-federation/bridge-react-webpack-plugin Major
@module-federation/modern-js Major
@module-federation/modern-js-v3 Major
@module-federation/retry-plugin Major
@module-federation/rsbuild-plugin Major
@module-federation/rstest Major
@module-federation/error-codes Major
@module-federation/inject-external-runtime-core-plugin Major
@module-federation/runtime-core Major
create-module-federation Major
@module-federation/cli Major
@module-federation/rspress-plugin Major
@module-federation/treeshake-server Major
@module-federation/treeshake-frontend Major
@module-federation/metro Major
@module-federation/metro-plugin-rnef Major
@module-federation/metro-plugin-rock Major
@module-federation/metro-plugin-rnc-cli Major
@module-federation/esbuild Patch
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/observability-plugin Patch
@module-federation/playground Patch
website-new Patch
@module-federation/storybook-addon Major
shared-tree-shaking-no-server-host Patch
shared-tree-shaking-no-server-provider Patch
@module-federation/utilities Patch
remote5 Patch
remote6 Patch
shared-tree-shaking-with-server-host Patch
shared-tree-shaking-with-server-provider Patch
node-dynamic-remote-new-version Patch
node-dynamic-remote Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Require (.*) on named catch-alls so plain :id params are not stripped.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tonoizer
tonoizer marked this pull request as ready for review August 11, 2026 17:52

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f2f526c69a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/bridge/vue3-bridge/src/basename.ts Outdated
Preserve historical basename fallback for layout mounts while still
preferring the last nested catch-all record.

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

pkg-pr-new Bot commented Aug 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

@module-federation/devtools

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/devtools@40c11f7

@module-federation/cli

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/cli@40c11f7

create-module-federation

pnpm add https://pkg.pr.new/module-federation/core/create-module-federation@40c11f7

@module-federation/dts-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/dts-plugin@40c11f7

@module-federation/enhanced

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/enhanced@40c11f7

@module-federation/error-codes

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/error-codes@40c11f7

@module-federation/esbuild

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/esbuild@40c11f7

@module-federation/managers

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/managers@40c11f7

@module-federation/manifest

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/manifest@40c11f7

@module-federation/metro

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/metro@40c11f7

@module-federation/metro-plugin-rnc-cli

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/metro-plugin-rnc-cli@40c11f7

@module-federation/metro-plugin-rnef

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/metro-plugin-rnef@40c11f7

@module-federation/metro-plugin-rock

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/metro-plugin-rock@40c11f7

@module-federation/modern-js

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/modern-js@40c11f7

@module-federation/modern-js-v3

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/modern-js-v3@40c11f7

@module-federation/native-federation-tests

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/native-federation-tests@40c11f7

@module-federation/native-federation-typescript

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/native-federation-typescript@40c11f7

@module-federation/nextjs-mf

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/nextjs-mf@40c11f7

@module-federation/node

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/node@40c11f7

@module-federation/observability-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/observability-plugin@40c11f7

@module-federation/playground

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/playground@40c11f7

@module-federation/retry-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/retry-plugin@40c11f7

@module-federation/rsbuild-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/rsbuild-plugin@40c11f7

@module-federation/rspack

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/rspack@40c11f7

@module-federation/rspress-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/rspress-plugin@40c11f7

@module-federation/rstest

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/rstest@40c11f7

@module-federation/runtime

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/runtime@40c11f7

@module-federation/runtime-core

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/runtime-core@40c11f7

@module-federation/runtime-tools

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/runtime-tools@40c11f7

@module-federation/sdk

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/sdk@40c11f7

@module-federation/storybook-addon

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/storybook-addon@40c11f7

@module-federation/third-party-dts-extractor

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/third-party-dts-extractor@40c11f7

@module-federation/treeshake-frontend

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/treeshake-frontend@40c11f7

@module-federation/treeshake-server

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/treeshake-server@40c11f7

@module-federation/typescript

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/typescript@40c11f7

@module-federation/utilities

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/utilities@40c11f7

@module-federation/webpack-bundler-runtime

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/webpack-bundler-runtime@40c11f7

@module-federation/bridge-react

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/bridge-react@40c11f7

@module-federation/bridge-react-webpack-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/bridge-react-webpack-plugin@40c11f7

@module-federation/bridge-shared

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/bridge-shared@40c11f7

@module-federation/bridge-vue3

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/bridge-vue3@40c11f7

@module-federation/inject-external-runtime-core-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/inject-external-runtime-core-plugin@40c11f7

commit: 40c11f7

@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Report

7 package(s) changed, 36 unchanged.

Package dist + ESM entry

Package Total dist (raw) Delta ESM gzip Delta
@module-federation/bridge-vue3 182.8 kB +2.2 kB (+1.2%) 26.3 kB +176 B (+0.7%)

Bundle targets

Package Web bundle (gzip) Delta Node bundle (gzip) Delta
@module-federation/bridge-vue3 19.5 kB +157 B (+0.8%) 19.6 kB +154 B (+0.8%)
@module-federation/cli 2.3 kB +4 B (+0.2%) 2.4 kB -31 B (-1.3%)
@module-federation/core 1.0 kB -3 B (-0.3%) 1.0 kB -32 B (-2.9%)
@module-federation/devtools 30.3 kB -1 B (-0.0%) 30.3 kB -24 B (-0.1%)
@module-federation/enhanced 2.7 kB -6 B (-0.2%) 2.8 kB -43 B (-1.5%)
@module-federation/metro-plugin-rnc-cli 416 B -1 B (-0.2%) 435 B -25 B (-5.4%)
@module-federation/node 9.1 kB +1 B (+0.0%) 9.2 kB -27 B (-0.3%)

Consumer scenarios

Scenario Web output (gzip) Delta Node output (gzip) Delta Gap (node-web) Delta
Enhanced remoteEntry 21.6 kB -9 B (-0.0%) 23.1 kB -20 B (-0.1%) +1.5 kB -11 B

Total dist (raw): 35.88 MB (+2.2 kB (+0.0%))
Total ESM gzip: 109.5 kB (+176 B (+0.2%))
Total web bundle (gzip): 238.3 kB (+151 B (+0.1%))
Total node bundle (gzip): 240.6 kB (-28 B (-0.0%))
Tracked ./bundler entry gzip: 556 B (no change)
Tracked ./bundler web bundle (gzip): 4.8 kB (no change)
Tracked ./bundler node bundle (gzip): 4.8 kB (no change)

Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as ./bundler are measured separately so ENV_TARGET-driven tree-shaking is visible. Bare imports are externalized to keep package-level sizes consistent, and assets are emitted as resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants