Skip to content

gioboa/module-federation-vite-examples

Repository files navigation

Module Federation Vite Examples

E2E Tests

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

Examples

Example Host Remote Framework
Alpine alpine-host alpine-remote Alpine.js
Angular angular-host angular-remote Angular
Lit lit-host lit-remote Lit
Nuxt nuxt-host nuxt-remote Nuxt 4
Preact preact-host preact-remote Preact 10
React react-host react-remote React 19
Solid solid-host solid-remote Solid
Svelte svelte-host svelte-remote Svelte 5
TanStack tanstack-host tanstack-remote TanStack Router + React 19
Vinext vinext-host vinext-remote Vinext + Next 16 + React 19
Vue vue-host vue-remote Vue 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.

About

Implementation examples of module-federation/vite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors