这是我在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