This project demonstrates how to implement micro frontends using an Rspack host and Vite remote modules, both with and without Module Federation. It consists of four applications:
-
rsbuild_host
The main host application built with Rsbuild.
It consumesrsbuild_remoteas a remote module and renders it, along with two variants of Vite remotes:vite_remote_mfusing Module Federationvite_remote_esmas a regular ESM module (no Module Federation)
-
rsbuild_remote
A remote application built with Rsbuild, using the same React version as the host. -
vite_remote_mf
A remote application built with Vite.
It exposes its module via the Module Federation plugin for consumption by the host. -
vite_remote_esm
A remote application built with Vite.
It exposes its module as a plain ESM build for direct import by the host (no Module Federation).
npm install
npm run devThis will install dependencies for all apps and start all of them. It should automatically open http://localhost:3000 in your browser.