This example demos consumption of federated modules from a vite bundle. host
(react based) depends on a component exposed by remote
app (react based). This is an Nx workspace implementing this example of vite-plugin-federation.
- Install dependencies using pnpm
- Preview the remote app:
pnpm nx preview remote
-
View the remote app at localhost:4301
-
Preview the host app in a separate terminal session:
pnpm nx apreview host
- View the host app at localhost:4300
This uses Project Crystal with Nx, which resolves the issues of using the previous @nx/vite
executor. Now it just works!