Home

Awesome

Module Federation Examples

This repository is to showcase examples of how Webpack 5's new Module Federation can be used.

Module Federation Universe

List of Examples

Click here to see the detailed list of examples in this repo Full Examples List

Check out our book

<a href="https://module-federation.myshopify.com/products/practical-module-federation" target="_blank"><img src="./docs/MFCover.png" alt='Practical Module Federation Book' width="95%"/></a><a href="https://module-federation.myshopify.com/products/practical-module-federation" target="_blank">We will be actively updating this book over the next year as we learn more about best practices and what issues people are running into with Module Federation, as well as with every release of Webpack as it moves towards a release candidate and release. So with your one purchase you are buying a whole year of updates.</a>

Consultations

<a href="https://calendly.com/scripted-alchemy/1-hr-group-consult" target="_blank">1 Hour group consultation</a>$100
<a href="https://calendly.com/scripted-alchemy/30-meeting-1-1" target="_blank">30 Min 1:1 consultation</a>$60
<a href="https://cb.run/WIVv" target="_blank">15 Min 1:1 consultation</a>$30
Bespoke API modifications and hands on code$300-$500/hr

Notes

The examples in this repository leverage pnpm and workspaces. To run from a git checkout locally, remove all of the proprietary example directories, ensure you have pnpm installed and run install pnpm i at the repo root. You can then run pnpm start from any of the non-proprietary examples. Some examples may use a different command such as "dev" or "serve".

<img src="https://ssl.google-analytics.com/collect?v=1&t=event&ec=email&ea=open&t=event&tid=UA-120967034-1&z=1589682154&cid=ae045149-9d17-0367-bbb0-11c41d92b411&dt=ModuleFederationExamples&dp=/email/ModuleFederationExamplesRoot">

Module federation will work with any type of file that you're able to import, that Webpack understands how to process. It is not a JS only, or React only feature. Images, CSS, JSON, WASM, and anything else can be federated.

Companies using Module Federation

Contribution to this repo

You decided to contribute to this project? Great, thanks a lot for pushing it!