鍍金池/ 問答/HTML/ webpack 配置里這兩個(gè)是干嘛的?能刪除嗎?

webpack 配置里這兩個(gè)是干嘛的?能刪除嗎?

    // split vendor js into its own file
    new webpack.optimize.CommonsChunkPlugin({
      name: 'vendor',
      minChunks: function (module) {
        // any required modules inside node_modules are extracted to vendor
        return (
          module.resource &&
          /\.js$/.test(module.resource) &&
          module.resource.indexOf(
            path.join(__dirname, '../node_modules')
          ) === 0
        )
      }
    }),
    // extract webpack runtime and module manifest to its own file in order to
    // prevent vendor hash from being updated whenever app bundle is updated
    new webpack.optimize.CommonsChunkPlugin({
      name: 'manifest',
      chunks: ['vendor']
    }),
回答
編輯回答
浪婳

https://doc.webpack-china.org...
webpack v4 已經(jīng)移除了這個(gè)plugin,替代的是:
https://doc.webpack-china.org...

2018年4月4日 13:14