webpack4 使用CommonsChunkPlugin遇到 webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead.问题

再webpack.config.js 文件中

  optimization: {
     //抽取公共的dm
         splitChunks: {
             cacheGroups: {
                 commons: {
                    name: "commons",
                    chunks: "initial",
                     minChunks: 2
                 }
             }
         }
     },

  

posted @ 2018-09-12 17:04  梦蝶庄周  阅读(9372)  评论(0编辑  收藏  举报