This workspace contains two apps:
apps/mobile: an Expo app that renders a React Native component natively and exposes the same component as a federated web module.apps/web-host: a webpack web app that loads the Expo component through module federation.
- The Expo app exposes
mobileApp/FederatedQuoteBuilderfromapps/mobile/src/modules/index.ts. - The web host consumes that remote from
http://localhost:19006/remoteEntry.js. - The shared UI is a quote builder card with editable inputs and computed outputs.
Install dependencies once:
pnpm installStart the Expo remote:
pnpm dev:mobileStart the web host in another terminal:
pnpm dev:webThen open:
- Expo web remote:
http://localhost:19006 - Web host:
http://localhost:3000
- Expo is configured to use webpack for web so module federation can attach to the web bundle.
- The Expo webpack integration currently emits a peer warning for
@expo/webpack-configwith Expo SDK 54, but the remote compiles and runs in this workspace.