Skip to content

goughjo03/NextJs-Module-Federation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

NextJS Module Federation

This began by following this article: https://medium.com/a-layman/build-micro-frontends-in-nextjs-and-reactjs-with-webpack-5-module-federation-e142ad76f48c

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

Navigation Idea

  1. The Section of the URL that should be handle by navigation inside the remote should be passed as a prop to the remote: route
  2. When the remote wants to navigate (change URL), it should dispatch custom event named 'nova-route-change' with detail of route: CustomEvent<{ route: string }>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors