Skip to content

JorySchiebroek/bestseller-buying-module-federation

 
 

Repository files navigation

bestseller-buying-module-federation

Micro frontend monorepo setup with Lerna and Module Federation.

Usage

Setup

With workspaces don't have to call lerna bootstrap

yarn install

You can also use npm workspaces

npm install --global npm     # installs npm v7 (npm@6 to downgrade)
npm install

Develop

yarn dev

or (with previews)

WITH_PREVIEWS=1 yarn dev

or (with previews and scoped modules)

WITH_PREVIEWS=1 yarn dev --scope @buying/style-card

Single remote production build

yarn clean
yarn single:build
yarn single:start

Multiple remotes production build

yarn clean
yarn multi:build
yarn multi:start

Docker

Build image with yarn

docker build . -t mlmf -f yarn.Dockerfile

Build image with npm (requires creating package-lock.json)

npm install
docker build . -t mlmf -f npm.Dockerfile

Run (localhost:8080)

docker run --rm -it -p 8080:80 --name mlmf mlmf

About

POC for trying module federation for the BESTSELLER Buying Frontend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 57.1%
  • TypeScript 26.5%
  • Dockerfile 9.2%
  • HTML 7.1%
  • CSS 0.1%