This repo host module federation with React as host and Next JS and React as remote app
- Disclaimer for NextJS apps you need the lates version of
@module-federation/nextjs-mf
that is a paid module, you can read more here
- It is a top-level app that depends on modules exposed from a remote app
- Runs on port
8080
-
remote-nextjs-module
- Exposes component to another app called host.
- Runs on port
8081
-
remote-react-module
- Exposes component to another app called host.
- Runs on port
8082
- Clone the project
- Navigate to
mf-react-nextjs
folder - Run in the root folder:
yarn
- Run:
yarn start
- Navigate to: http://localhost:8080/