1

I have these settings in a Webpack 2.x config file and I'm migrating to Webpack 4. I know CommonsChunkPlugin is deprecated and I should use optimization.splitChunks, but I couldn't find anywhere in the docs on how to convert two CommonsChunkPlugin instances.

new webpack.optimize.CommonsChunkPlugin({
        name: 'common',
        minChunks: Infinity
    }),
new webpack.optimize.CommonsChunkPlugin({
    name: 'vendor',
    chunks: ["vendor", "app"],
    minChunks: 2
}),

How can I get the same results from the above settings with optimization.splitChunks?

Siraj Kakeh
  • 741
  • 6
  • 20

0 Answers0