bgorkem / webpack5-module-federation-example

Webpack 5 Module Federation example with React and Lerna

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webpack 5 - Federated Modules - with Lerna

Introduction

Webpack 5 allows live importing of a remote module from another URL, once you load the script and (import / export) modules

Here we use a dynamically loaded library in lib1 package

We use lerna and yarn workspaces to manage 2+ packages in one repo

Yarn workspaces manage cross package dependencies / symbolic links

Lerna manage package publishing / running scripts ...

Run

yarn to install

yarn start to start sites

Then browse http://localhost:3001

About

Webpack 5 Module Federation example with React and Lerna


Languages

Language:JavaScript 95.0%Language:HTML 5.0%