A Vite plugin that enables Module Federation across Vite-based projects, allowing micro-frontends to share components, stores, and utilities at runtime. Current stable version is 0.0.4 (pre-release). Release cadence is rapid but untracked; the plugin is in early development. Key differentiators: native integration with Vite's dev server and build pipeline, support for Vite 5, 6, 7, and 8, and TypeScript-first design. Unlike Webpack Federation, this plugin leverages Vite's ESM-based module system for faster HMR and lighter builds. Requires Node >= 20.19.0 and Vite ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 as peer dependencies. Currently in pre-release; API may change without notice.
npm install vite-plugin-federationVerified import paths — ran on the pinned version, not inferred.
Shows basic setup with Vite config using federation plugin, defining a remote and sharing React as singleton.
Lock version to current minor and test upgrades carefully. Monitor GitHub releases.
Expect and adapt to changes. Follow the repository for updates.
Ensure your project uses Vite ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0.
Update Node.js to 20.19.0 or higher.
npm install vite-plugin-federation --save-dev && ensure tsconfig includes 'moduleResolution': 'bundler' or 'node16'.
Use import { federation } from 'vite-plugin-federation' (ESM). If using require, use const { federation } = require('vite-plugin-federation').Verify the remote URL and ensure CORS headers are set on the remote server.
No dependency data recorded yet.