- Container App
yarn start container
- Home App
yarn start home
To run both apps in parallel
yarn start:all
- This repo is using a local registry version of nx to enable webpack 5
- See Add support for webpack 5 in Nx 12.x
- How to add webpack 5 support to React apps
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.
- Set the
runtimeChunk
webpack optimization to false for the remote app. See example - Set the
context
to the current working directory. See example