Background
mf 插件在配置 remotes 时 entries 仅支持传入 url,不具备运行时动态根据环境信息、版本号等因素确定最终加载资源地址的能力。
Proposal
{
//...
mf: {
name: 'hostUser',
remotes: [
{
name: 'remoteCounter',
entries: {
DEV: 'window.mfRemoteUrl', // 支持变量
PROD: 'https://production.com/remote.js', // 支持 url
},
keyResolver: `(() => 'DEV')()`,
},
{
aliasName: 'utopia',
name: 'notExist',
entry: 'http://1.2.3.4:404/bad_file.js',
},
],
shared,
},
}
Additional context
Background
mf 插件在配置 remotes 时 entries 仅支持传入 url,不具备运行时动态根据环境信息、版本号等因素确定最终加载资源地址的能力。
Proposal
Additional context