Skip to content

1.0.0

Choose a tag to compare

@unadlib unadlib released this 10 May 17:18
· 34 commits to main since this release

vite-plugin-federation v1.0.0

vite-plugin-federation is now stable for production-oriented Vite Module Federation 2.x deployments.

This release focuses on manifest-first federation, Node SSR, multi-tenant runtime isolation, production rollout controls, typed federation workflows, and Vite 5/6/7/8 compatibility including Rolldown-aware build handling.

Highlights

  • Stable manifest protocol with mf-manifest.json, mf-stats.json, and mf-debug.json.
  • Production runtime helpers via vite-plugin-federation/runtime.
  • Manifest loading with cache TTL, stale-while-revalidate, retries, timeout, fallback URLs, request collapsing, and circuit breakers.
  • SRI and SHA-256 content-hash verification for manifest remote entries and annotated assets.
  • Node SSR support with ssrRemoteEntry, createServerFederationInstance(), and preload link collection.
  • Multi-tenant isolation through createFederationRuntimeScope(runtimeKey).
  • Dev remote HMR with classified partial, style, types, and full update strategies.
  • Devtools overlay and stable runtime debug snapshots.
  • DTS generation, consumption, manifest-derived type URLs, build-time type checks, and dev hot type sync.
  • OriginJS virtual:__federation__ compatibility and Webpack/SystemJS migration coverage.
  • Stable MFV-001 through MFV-007 diagnostic error codes.
  • Vite peer support for ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0.

Installation

pnpm add -D vite-plugin-federation@1.0.0

Runtime API

Use the curated runtime entry for production loading and diagnostics:

import {
  loadRemoteFromManifest,
  createFederationRuntimeScope,
  createServerFederationInstance,
  collectFederationManifestPreloadLinks,
  getFederationDebugInfo,
} from 'vite-plugin-federation/runtime';

Migration Notes

  • Prefer manifest URLs in remotes, for example https://cdn.example.com/catalog/mf-manifest.json.
  • Prefer vite-plugin-federation/runtime over direct runtime imports for manifest-first loading controls.
  • Keep the OriginJS compatibility shim enabled during migration, then disable it after old virtual:__federation__ imports are removed.
  • Configure explicit shared singleton/version policies for framework and design-system packages.
  • Node SSR hosts currently need node --experimental-vm-modules.
  • The v1 support floor is Node >=20.19.0.

Known Limitations

  • Browser CommonJS remote entries are not supported; use ESM/manifest remotes for browser hosts.
  • systemjs remotes require a compatible globalThis.System.import runtime.
  • Signed manifest verification is intentionally implemented through an application-provided custom fetch wrapper.
  • SSR manifest URLs must come from an operator-controlled allowlist. Do not pass request-controlled URLs directly into server-side federation loaders.

Validation

This release is covered by unit tests, package smoke tests, packed-tarball checks, a Vite 5/6/7/8 peer matrix, and Playwright coverage for browser federation, browser matrix, compatibility, shared negotiation/fallbacks, multi-remote hosts, SSR, and DTS dev hot sync.

Full Changelog: v0.2.0...v1.0.0