The repository was taken as a basis mf-nextjs
I have expanded this example based on the original. Adding dockerization, typescript, monorepo mode with ssr and remote mode without ssr.
It is not recommended in production, because it can cause unintended errors,
the library used @module-federation/nextjs-mf
, has a version higher than
in this repository, but there are problems with it.
Examples on vercel, remote mode only, without SSR.
Shell app
App1
App2
$ yarn install
$ make -B .env env=local
$ yarn dev
# http://localhost:3000 - main app
# http://localhost:3001 - cube app
# http://localhost:3002 - prisma app
$ yarn install
$ make -B .env env=local
$ yarn build
$ yarn start
# http://localhost:3000 - main app
# http://localhost:3001 - cube app
# http://localhost:3002 - prisma app
$ make -B .env env=local
$ docker-compose -f "docker-compose-monorepo.yml" up -d --build
# http://localhost:3000 - main app
# http://localhost:3001 - cube app
# http://localhost:3002 - prisma app
$ make -B .env env=local
$ docker-compose -f "docker-compose.yml" up -d --build
# http://localhost:3000 - main app
# http://localhost:3001 - cube app
# http://localhost:3002 - prisma app