Webpack 3到Webpack 4-通用块插件到拆分块插件

时间:2019-01-31 21:59:43

标签: webpack webpack-4 webpack-3 webpack-3.5

这是我在Webpack 3中常用的块插件配置。

<button><img [src]="myComponentVariableName" /></button>

我正在尝试使用// code splitting new webpack.optimize.CommonsChunkPlugin({ name: 'manifest', minChunks: Infinity, }), new webpack.optimize.CommonsChunkPlugin({ name: 'main', children: true, // recurse through imports of the files too minChunks: 6, // and if a file is used in 6 places or more, put it in the main.js bundle }), 在Webpack 4中进行镜像,但是我得到的捆绑包尺寸明显更大。有人可以帮助我将此Split Chunks Plugin设置转换为Common Chunks Plugin设置吗?这是我目前使用Split Chunks所做的事情:

Split Chunks

0 个答案:

没有答案