MCPcopy Index your code
hub / github.com/module-federation/module-federation-examples

github.com/module-federation/module-federation-examples @main

repository ↗ · DeepWiki ↗ · + Follow
2,274 symbols 6,098 edges 2,513 files 49 documented · 2% updated 12d ago★ 6,13849 open issues
README

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

Deploy with Zephyr Cloud

Zephyr Cloud Logo

Zephyr Cloud is a cloud deployment provider that integrates directly into your build with zero config.

  • Automatically deploys your federated applications during the build process - simply save your code and get a URL in seconds.
  • Works with Webpack, Vite, Rspack, and more.
  • Deploy using BYOC to any cloud provider.
  • Manages complex multi-artifact deployments across different release cadences, handles micro frontend dependency management automatically, and provides version rollback and roll-forward capabilities.

Start for free today at zephyr-cloud.io.

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

  • Netflix
  • Auth0
  • Best Buy
  • SAP
  • AWS
  • SemRush
  • Ford Motor Company
  • JPMorgan Chase
  • Microsoft
  • Lululemon
  • Housing.com
  • VMware
  • Talkdesk
  • Cricket Wireless
  • Reddit
  • Bytedance
  • Rivian (in the cars themselves)
  • Realtor.com
  • FICO
  • Digital Ocean
  • Alibaba
  • Tencent
  • Wayfair
  • RingCentral
  • Indeed
  • Telia
  • Beamery
  • Amazon
  • Sony
  • Paypal
  • OVO Energy
  • MGM
  • Lowes
  • Home Depot
  • Epic Games
  • ExpediaGroup
  • Verizon
  • MindTickle
  • Experian
  • Herodevs
  • CloudFlare
  • Cisco
  • Business Insider
  • Box.com
  • AfterPay
  • OLX
  • Shopify
  • adidas
  • Zomato
  • SHIELD
  • PayNet (Payments Network Malaysia)
  • and many more I cant remember

Contribution to this repo

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

Extension points exported contracts — how you extend this code

ContentProps (Interface)
(no doc)
react-16-17-18-ssr/remote1/src/Content.tsx
ButtonProps (Interface)
(no doc)
loadable-react-16/app1/src/client/components/Button.tsx
ContentProps (Interface)
(no doc)
loadable-react-16/app2/src/client/components/Content.tsx
AppProps (Interface)
(no doc)
different-react-versions-16-17-typescript/app1/src/components/App.tsx
ButtonProps (Interface)
(no doc)
different-react-versions-16-17-typescript/app2/src/components/Button.tsx
AppConfig (Interface)
(no doc)
nextjs-ssr/e2e/checkNextjsSsr.spec.ts
AppConfig (Interface)
(no doc)
nextjs-dynamic-ssr/e2e/checkNextjsDynamicSsr.spec.ts
AppProps (Interface)
(no doc)
different-react-versions-typescript/app1/src/components/App.tsx

Core symbols most depended-on inside this repo

checkElementWithTextPresence
called by 183
playwright-e2e/common/base.ts
hexToRgb
called by 107
shared-routing/profile/src/assets/jss/material-dashboard-react.js
openLocalhost
called by 87
playwright-e2e/common/base.ts
get
called by 73
advanced-api/dynamic-remotes-runtime-environment-variables/host/src/hooks/useFederatedComponent.js
checkElementContainText
called by 58
playwright-e2e/common/base.ts
apply
called by 47
modernjs/provider/ChunkPatchPlugin.js
checkElementVisibility
called by 45
playwright-e2e/common/base.ts
getRemoteEntry
called by 34
advanced-api/dynamic-remotes/shared-config.js

Shape

Function 1,631
Method 298
Class 235
Interface 105
Enum 5

Languages

TypeScript100%

Modules by API surface

comprehensive-demo-react16/app-04/public/main.js176 symbols
playwright-e2e/common/base.ts36 symbols
comprehensive-demo-react18/app-04/public/494.494.js34 symbols
rust-wasm/remote/pkg/index_bg.js26 symbols
advanced-api/dynamic-remotes/runtime-plugins.js21 symbols
advanced-api/dynamic-remotes/types/module-federation.d.ts16 symbols
nextjs-ssr/e2e/checkNextjsSsr.spec.ts15 symbols
nextjs-ssr-manifest/e2e/checkNextjsSsrManifest.spec.ts15 symbols
advanced-api/dynamic-remotes/app1/src/App.tsx15 symbols
advanced-api/dynamic-remotes-synchronous-imports/moduleConfig.js15 symbols
unit-test/mf-test/index.js14 symbols
nextjs-dynamic-ssr/e2e/checkNextjsDynamicSsr.spec.ts14 symbols

Dependencies from manifests, versioned

@analogjs/vite-plugin-angular2.3.1 · 1×
@angular-devkit/build-angular20.3.21 · 1×
@angular/animations20.3.18 · 1×
@angular/build20.3.21 · 1×
@angular/cli15.2.10 · 1×
@angular/common20.3.18 · 1×
@angular/compiler20.3.18 · 1×
@angular/compiler-cli20.3.18 · 1×
@angular/core20.3.18 · 1×
@angular/forms15.2.10 · 1×
@angular/platform-browser20.3.18 · 1×
@angular/platform-browser-dynamic20.3.18 · 1×

For agents

$ claude mcp add module-federation-examples \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact