jskits/vite-plugin-federation: A Vite/Rollup plugin for Module Federation.
Briefly

jskits/vite-plugin-federation: A Vite/Rollup plugin for Module Federation.
"Builds emit mf-manifest.json + mf-stats.json + mf-debug.json. Hosts consume via curated vite-plugin-federation/runtime helpers. Real dev HMR for remotes Sidecar dev runtime with classified updates when dev.remoteHmr: true: partial, style, types, full. SSR (Node) Dedicated ssrRemoteEntry, createServerFederationInstance, asset-preload collection for streaming HTML."
"Production-grade host loader Cache TTL, staleWhileRevalidate, retries with jitter, timeouts, fallback URLs, circuit breaker, request collapsing. Multi-tenant createFederationRuntimeScope(runtimeKey) for isolated manifest cache, breaker, and debug records per tenant on a single page."
"Security SRI / SHA-256 integrity verification (multi-mode), private/authenticated manifests, CSP & Trusted Types guidance, and a signed-manifest recipe. Observability getFederationDebugInfo(), telemetry hooks, dev devtools panel, stable error codes (MFV-001 MFV-007). OriginJS migration shim virtual:__federation__ and __federation_method_* shim enabled by default for common OriginJS migration paths."
"vite-plugin-federation 1.0 is generally available for manifest-first Vite remotes, browser hosts, Node SSR hosts, DTS generation and consumption, dev remote HMR, and the curated runtime APIs. Webpack/SystemJS/var remotes remain compatibility paths covered by e2e and should still be validated in each migration. Signed manifests are a documented supply-chain pattern; signature verification is intentionally provided through a custom fetch wrapper rather than built into the default runtime."
The plugin delivers a first-class compiler adapter for Vite versions 5 through 8 and rolldown, including Vite 8 module-preload helper rewrite and rolldownOptions handling. It generates mf-manifest.json, mf-stats.json, and mf-debug.json for remotes and provides curated runtime helpers for hosts to consume those manifests. It supports real development HMR for remotes using a sidecar dev runtime with classified updates for partial, style, types, and full changes. It includes SSR support with a dedicated ssrRemoteEntry, createServerFederationInstance, and asset-preload collection for streaming HTML. For production, it offers host loader features such as caching with TTL and staleWhileRevalidate, retries with jitter, timeouts, fallback URLs, circuit breaker behavior, and request collapsing. It also supports multi-tenant runtime scoping, SRI/SHA-256 integrity verification, CSP and Trusted Types guidance, observability hooks, stable error codes, and an OriginJS migration shim enabled by default.
Read at github.com
Unable to calculate read time
[
|
]