For AI agents: the complete documentation index is available at https://mfdoctor.kevinbeier.com/llms.txt, the full documentation bundle is available at https://mfdoctor.kevinbeier.com/llms-full.txt, and this page is available as Markdown at https://mfdoctor.kevinbeier.com/rules/federation/vite-webpack-nonsingleton-share.md.

federation/vite-webpack-nonsingleton-share

  • Category: correctness
  • Default severity: error

Issue

Since @module-federation/vite 1.22.0, a webpack/rspack/enhanced peer that shares the same package as a non-singleton can mark that share loaded without the lib a Vite remote's production loadShare wrapper expects, so container init crashes with RUNTIME-015 on every reload after the first load.

How to fix it

Upgrade @module-federation/vite to >=1.23.4 so Vite remotes seed unbridged webpack non-singleton shares (https://github.com/module-federation/vite/issues/1429).

Suppress or retarget with rules["federation/vite-webpack-nonsingleton-share"] set to "off" or a severity, see Suppressions and allowlists.

Sources