This began by following this article: https://medium.com/a-layman/build-micro-frontends-in-nextjs-and-reactjs-with-webpack-5-module-federation-e142ad76f48c
- remote is in directory mf-example
- host is in directory host
to run, you need two terminals
remote: cd ./mf-example && npm i && npm run dev
host: cd ./host && npm i && npm run dev
visit http://localhost:3000
- The Section of the URL that should be handle by navigation inside the remote should be passed as a prop to the remote:
route - When the remote wants to navigate (change URL), it should dispatch custom event named 'nova-route-change' with detail of route:
CustomEvent<{ route: string }>