This example shows how to handle independent and routings in a MFE setup based on webpack-module-federation. The setup consists of:
react
&vue
: apps using a browser history strategy when acting as hosts and an in-memory history strategy when acting as remotes.host
: host app based on a browser history strategy that handles high-level routing. Host routing determines mounting/unmounting ofreact
andvue
remotes.
The host is the only component responsible for updating browser url. The two level of history strategies (browser + in-memory) are kept in sync through an event-based communication between shell and remotes.
Navigate other applications:
- Install deps:
yarn install
. - Start apps:
yarn start
.
Visit http://localhost:8080 to navigate host
app. react
and vue
are also exposed as standalone apps at http://localhost:8081 and http://localhost:8082 respectively.