import { init } from '@module-federation/runtime';
import autoPreloadPlugin from '@module-federation/auto-preload';
init({
name: '@demo/app-main',
remotes: [
{
name: '@demo/app2',
entry: 'http: //localhost:3006/mf-manifest.json',
alias: 'app2',
},
],
plugins: [autoPreloadPlugin({
// 默认值会通过 script 来预加载 js 文件,可通过 useLinkPreload: true 来修改此行为
useLinkPreload: false
})],
});