Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 828 Bytes

README.md

File metadata and controls

26 lines (16 loc) · 828 Bytes

React - Vite Federation Demo

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.

Running

  1. Install dependencies using pnpm
  2. Preview the remote app:
pnpm nx preview remote
  1. View the remote app at localhost:4301

  2. Preview the host app in a separate terminal session:

pnpm nx apreview host
  1. View the host app at localhost:4300

Notes

This uses Project Crystal with Nx, which resolves the issues of using the previous @nx/vite executor. Now it just works!