3.0.0-alpha.0 • Published 11 months ago

@autobest-ui/module-federation-runtime-plugin v3.0.0-alpha.0

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

@autobest-ui/module-federation-runtime-plugin

介绍

用于webpack ModuleFederationPlugin下,prod build打包时设置runtimeChunk时不能正常加载共享文件问题。

如下:

runtimeChunk: {
    name: 'manifest'
}

安装

npm install @autobest-ui/module-federation-runtime-plugin --save-dev

使用方式

const ModuleFederationRuntimePlugin = require('@autobest-ui/module-federation-runtime-plugin');

// webpack.config.js下新增
plugin: [
  new ModuleFederationRuntimePlugin({
    // 共享文件名,与ModuleFederationPlugin参数filename对应
    remoteEntryName: 'remoteEntry.js',
    // runtimeChunk的值
    runtimeChunkName: 'manifest.js',
  })
]
参数名默认值说明
remoteEntryName'remoteEntry.js'共享文件名,与ModuleFederationPlugin参数filename对应
runtimeChunkName'manifest.js'runtimeChunk的值,single是'runtime.js'
cacheGroupsVendorName'vendor'splitChunks.cacheGroups下设置的外部依赖名
3.0.0-alpha.0

11 months ago

0.1.0

1 year ago

0.0.2

2 years ago

0.0.4-alpha.0

2 years ago

0.0.3-alpha.0

2 years ago

0.0.2-alpha.0

2 years ago

0.0.1

2 years ago