We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d179bb3 commit a0ba632Copy full SHA for a0ba632
1 file changed
webpack/webpack.common.js
@@ -384,8 +384,10 @@ if (isMfeEnabled) {
384
const mfeName = toMfeName(paths.projectName)
385
386
// 使用动态配置生成 remotes
387
- const remotes = isMfeHost ? generateRemotesConfig(isDev) : {}
388
-
+ // 注意:即使当前构建目标是 remote,也可能会编译到 Host 的路由/页面文件。
+ // 为避免出现 "Can't resolve 'projectA/App'" 这类编译错误,这里统一注册 remotes。
389
+ const remotes = generateRemotesConfig(isDev)
390
+
391
// 输出配置信息(仅在开发环境)
392
if (isDev && isMfeHost) {
393
// eslint-disable-next-line no-console
0 commit comments