/module-federation-examples

Examples showcasing Webpack 5's Module Federation

Primary LanguageJavaScriptMIT LicenseMIT

Module Federation Examples

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

Examples

  • Basic Host-Remote — App 1 consumes remote components from App2.
  • Bi-Directional Hosts — App1 consumes App2 components; App2 consumes App1 components.
  • Self-Healing — Fallback to remote apps vendors if a dependency fails to load.
  • Server-Side Rendering — App1 and App2 with SSR.
  • Nested Interleaved Components
  • Share State/Context Providers
  • Non-UI Module
  • Routing
  • Nested
  • Version Discrepancy
  • TypeScript — Simple host/remote example using TypeScript.
  • NextJS