/nx-module-federation-webpack5

A minimal repo using NX with react and web pack 5

Primary LanguageJavaScript

NX Webpack 5 react

To run both apps in parallel yarn start:all

Notes

The home app exposes a component Home which renders a <h2>Home Remote</h2> The container app consumes the exposed Home component and renders it. TAAA DAHH! Module federation working inside of an NX monorepo.

Changes I made to get module federation working

  • Set the runtimeChunk webpack optimization to false for the remote app. See example
  • Set the context to the current working directory. See example

Shout out robdonn & coogie - The Travel Buddies 🌮