#ModuleFederation
共 6 篇文章
解决 Vite 模块联邦 报错 dynamic remote manifest chunk missing 运行时缺失修复
排查 使用 @originjs/vite-plugin-federation 构建 Vite 微前端时,动态加载远程组件报 Failed to fetch dynamically imported module 或 TypeError: Failed to resolve module specifier,分析 ESM 运行时打包与静态资源部署路径。
解决 模块联邦 报错 dynamic publicPath runtime resolution 路径失配修复
排查 微前端子应用部署在多环境(开发/测试/生产)时,模块联邦资源路径写死导致无法跨环境动态部署,分析 __webpack_public_path__ 动态注入机制。
解决 模块联邦 报错 CSS chunk loading order override 样式层叠覆盖修复
排查 微前端使用模块联邦引入远程组件后,远端组件自带的全局 CSS 样式覆盖了主应用的全局样式,或者主应用样式污染远端组件,分析 CSS 异步 Chunk 注入顺序与样式命名空间。
解决 模块联邦 报错 Shared module is not available for eager consumption 饥饿加载修复
排查 Webpack 模块联邦在项目打包或本地开发启动时报错 Uncaught Error: Shared module is not available for eager consumption,分析 异步加载入口(Async Boundary / bootstrap.js)与 eager 配置。
解决 Webpack 模块联邦 报错 ScriptExternalLoadError remoteEntry.js 加载失败修复
排查 微前端使用 Webpack 5 ModuleFederationPlugin 加载远端微应用时报 ScriptExternalLoadError: Loading script failed for remoteEntry.js,分析 跨域 CORS、publicPath 动态补全与资源 Hash 缓存失效。
解决 模块联邦 报错 Shared module has multiple copies React 规则破坏修复
排查 模块联邦应用报 Warning: Invalid hook call. Hooks can only be called inside of the body of a function component,分析 React 单例共享配置(singleton: true)缺失与版本范围失配。


