Micro Frontends with Webpack 5 Module Federation and React

Demo

Setting up a micro frontend (remote)

npx create-react-app mfe1
import() is the syntax for dynamic module imports. Read more here: https://2ality.com/2017/01/import-operator.html

Setting up the host app (container)

npx create-react-app container

Share component(s) from micro frontend

Consume micro frontend(s) from Host

Demo

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store