-
-
Notifications
You must be signed in to change notification settings - Fork 375
Open
Labels
✨ enhancementNew feature or requestNew feature or request
Description
Describe the bug
The Vue3 Bridge uses router.getRoutes()
internally, which flattens the route hierarchy. This breaks nested routes that rely on parent-child relationships.
// In bridge-vue3/src/provider.ts line 62:
let routes = bridgeOptions.router.getRoutes();
Workaround
Add a name
to each nested route to ensure correct behavior.
Proposed Fix
Replace router.getRoutes()
with router.options.routes
to preserve the nested structure.
Environment
@module-federation/bridge-vue3
: ^0.16.0- Vue: ^3.5.17
- vue-router: ^4.5.1
Reproduction
N/A
Used Package Manager
npm
System Info
System:
OS: Windows 11 10.0.22631
CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz
Memory: 6.06 GB / 31.71 GB
Binaries:
Node: 22.16.0 - C:\Program Files\nodejs\node.EXE
npm: 10.9.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Chromium (138.0.3351.65)
Internet Explorer: 11.0.22621.3527
Validations
- Read the docs.
- Read the common issues list.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Module federation issue and not a framework-specific issue.
- The provided reproduction is a minimal reproducible example of the bug.
LuisDev2001LuisDev2001
Metadata
Metadata
Assignees
Labels
✨ enhancementNew feature or requestNew feature or request