ecomfe/reskript

5.6版本 配联邦直接启动不起来,很尴尬

Closed this issue · 0 comments

  build: {
        appTitle: 'PostalSavings',
        finalize: webpackConfig => {
            webpackConfig.plugins.push(
                new ModuleFederationPlugin({
                    name: 'plugins',
                    filename: 'plugins.js',
                    runtime: 'plugins',
                    exposes: {
                        './VideoListOperates': './src/plugins/WorksListOperate/index.js',
                    },
                    // shared: {
                    //     react: {singleton: true},
                    //     'react-dom': {singleton: true},
                    // },
                })
            );
            return webpackConfig;
        },
    }