module-federation / module-federation-examples

Implementation examples of module federation , by the creators of module federation
https://module-federation.io/
MIT License
5.67k stars 1.76k forks source link
demo examples federated federation federation-dashboard module module-federation nextjs stream-federated

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

Practical Module Federation Book 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.

Consultations

1 Hour group consultation \$100
30 Min 1:1 consultation \$60
15 Min 1:1 consultation \$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".

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!