-
Hello. I'm building a Micro Frontend app based on Vue using Module Federation with Vite with the following structure: Vue Host app:
Vue Child app:
The problem is that, when I try to navigate to different views inside the child app using router-link or "router.push", the Host app is updating the URL, and not the Child app. This is how I expose the view from the child app:
This is the View I expose:
And the routes:
In the host app I get the code exposed like this:
And set the router like this:
How can I get the internal navigation of the internal app to work properly? Is there a way to "scope" the routers? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I think the reason is that the router is bound to the runtime instance of vue, which makes it impossible to use the router defined in remote on the host side |
Beta Was this translation helpful? Give feedback.
-
More details #139 (comment) |
Beta Was this translation helpful? Give feedback.
I think the reason is that the router is bound to the runtime instance of vue, which makes it impossible to use the router defined in remote on the host side