SetiZ / module-federation-react

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webpack 5 Module Federation with React

This example shows a basic host application loading remote components

For more information, visit the article explaining this workflow

  • app1 expose component for import by other apps.
  • app2 will import exposed component from app1

Running Demo

Run npm install and npm start inside each repo respectively. This will build and serve your apps on ports 3001, 3002

Example referenced from https://github.com/module-federation/module-federation-examples/tree/master/basic-host-remote

npm install --save-dev @babel/core @babel/preset-react babel-loader bundle-loader html-webpack-plugin serve webpack webpack-cli webpack-dev-server npm install --save react react-dom

About


Languages

Language:JavaScript 92.6%Language:HTML 7.4%