| name | React Multi-Bundler Module Federation | |
|---|---|---|
| slug | module-federation/react-vite-rspack-webpack | |
| description | Module Federation across Vite, Rspack, and Webpack bundlers, deployed with Zephyr Cloud | |
| framework | react | |
| bundler | webpack | |
| features |
|
|
| complexity | advanced |
A comprehensive micro-frontend setup demonstrating Module Federation with multiple bundlers working together.
- Framework: React 18
- Architecture: Module Federation
- Host Application: Vite
- Remote Applications:
- Vite Remote (TypeScript)
- Rspack Remote
- Webpack Remote
- Deployment: Zephyr Cloud
- Node.js (version 16 or higher)
- pnpm (required for workspace management)
This example consists of multiple applications:
host/- Main host application built with Viteremote/- Remote application built with Viterspack/- Remote application built with Rspackwebpack/- Remote application built with Webpack
-
Install dependencies
pnpm install
-
Build all applications (in order)
pnpm --filter=vite_remote build pnpm --filter=vite_rspack build pnpm --filter=vite_webpack build pnpm --filter=vite-host build
Or use the convenience script:
pnpm build
-
Development mode Each application can be run independently:
# Host application (port 5173) cd host && pnpm dev # Remote applications cd remote && pnpm dev # port 5174 cd rspack && pnpm dev # port 8080 cd webpack && pnpm dev # port 3000
Development URLs:
- Host: http://localhost:5173
- Vite Remote: http://localhost:5174
- Rspack Remote: http://localhost:8080
- Webpack Remote: http://localhost:3000
This example demonstrates advanced micro-frontend deployment with Zephyr Cloud, showing how different bundlers can work together seamlessly in a federated architecture.
Module Federation allows multiple JavaScript applications to share components and dependencies at runtime. This example shows:
- Multi-bundler compatibility: Different remotes using different bundlers
- Runtime composition: Components loaded dynamically at runtime
- Independent deployment: Each remote can be deployed separately
Zephyr Cloud is a micro-frontend deployment platform that provides:
- Auto-deployment: Seamless deployment from your build process
- Live preview links: Instant preview URLs for your applications
- SemVer versioning: Semantic versioning for your frontend modules
- Rollback capabilities: Easy rollback to previous versions
- Enterprise-scale orchestration: Built for composable frontend systems
