Skip to content

MFE ForgeMicro frontends for Vite and React

A CLI that scaffolds and synchronises Module Federation hosts and remotes, plus small runtime packages for loading and coordinating them. Pre-1.0.

MFE Forge logo

Quick start ​

bash
npx mfe-forge@latest init my-platform --package-manager npm
cd my-platform
# set "workspaces": ["apps/*/*", "packages/*"] in package.json (see Installation)
npx mfe generate host platform/host
npx mfe generate app platform/dashboard
npm install
npx mfe doctor

The npm package is mfe-forge; it installs the binaries mfe-forge and mfe. The Quick start continues from here and renders the remote inside the host. Requirements are listed under Installation.

Status

MFE Forge is on the 0.x line and minor versions may break. Templates currently use @originjs/vite-plugin-federation with Vite 5.4; Module Federation 2.0 support is planned. See Status and maturity.

Packages ​

PackageDescription
mfe-forgeCLI: init, generate, dev, build, test, sync, doctor, config and diagnostics
@mfe-forge/coreMFErrorBoundary, LazyRemote, RemoteLoader, RemoteRegistry, EventBus
@mfe-forge/routeruseMFENavigation, useRouteSync, generateRoutes, createRouteGuard for React Router 7
@mfe-forge/storeuseGlobalStore, createScopedStore, syncStoreAcrossMFEs for Zustand 5
@mfe-forge/designDesign tokens and applyTokens for CSS custom properties
@mfe-forge/testingrenderMFE, mockRemoteModule, waitForRemoteLoad, Playwright e2eHelpers

All six packages are released together under one version number.

Learn more ​

Released under the MIT License.