admin管理员组

文章数量:1279248

I am getting this error

Error: webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead.

new webpack.optimize.CommonsChunkPlugin({
  filename: DEBUG ? 'bundle.js' : 'bundle.min.js',
  name: "vendor"
})

I am getting this error

Error: webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead.

new webpack.optimize.CommonsChunkPlugin({
  filename: DEBUG ? 'bundle.js' : 'bundle.min.js',
  name: "vendor"
})
Share Improve this question edited Aug 12, 2021 at 13:20 Penny Liu 17.5k5 gold badges86 silver badges108 bronze badges asked Apr 4, 2019 at 6:41 Mohit PrakashMohit Prakash 5122 gold badges7 silver badges16 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

As the error states, the plugin is deprecated since webpack 4

You should remove it and use a different plugin.

There are plenty of posts where you can find how to do this but here is an example: Webpack 4 migration CommonsChunkPlugin

本文标签: