Module Federation Vite Examples

March 30, 2026 ยท View on GitHub

E2E Tests

A collection of Module Federation examples built with Vite, used to test new @module-federation/vite PRs and releases.

Examples

ExampleHostRemoteFramework
Alpinealpine-hostalpine-remoteAlpine.js
Angularangular-hostangular-remoteAngular
Litlit-hostlit-remoteLit
Nuxtnuxt-hostnuxt-remoteNuxt 4
Preactpreact-hostpreact-remotePreact 10
Reactreact-hostreact-remoteReact 19
Solidsolid-hostsolid-remoteSolid
Sveltesvelte-hostsvelte-remoteSvelte 5
TanStacktanstack-hosttanstack-remoteTanStack Router + React 19
Vinextvinext-hostvinext-remoteVinext + Next 16 + React 19
Vuevue-hostvue-remoteVue 3

Each example follows a host/remote architecture with shared dependencies.

E2E tests run against

  • Vite 7
  • Vite 8

Getting Started

# Install dependencies
pnpm install

# Run examples
pnpm alpine:dev
pnpm angular:dev
pnpm lit:dev
pnpm react:dev
pnpm preact:dev
pnpm solid:dev
pnpm vue:dev
pnpm svelte:dev
pnpm tanstack:dev
pnpm nuxt:dev
pnpm vinext:dev

E2E Tests

Tests are powered by Playwright.

# Run tests (defaults to React example)
pnpm exec playwright test

# Run tests for Vue example
PLAYWRIGHT_TEST_COMMAND="pnpm vue:preview" pnpm exec playwright test

Testing a PR

Update the @module-federation/vite version in pnpm-workspace.yaml catalog:

catalog:
  "@module-federation/vite": "https://pkg.pr.new/@module-federation/vite@<PR_NUMBER>"

Then reinstall and run the examples.