ahskaus ahskaus - 2 months ago 22
React JSX Question

CommonChuckPlugin is not a constructor

Getting this error for some strange reason

TypeError: webpack.CommonsChunkPlugin is not a constructor

Other plugins are working fine for me:

new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
// create global variables accessible on server and client
new webpack.DefinePlugin({

Answer

Because it's not webpack.CommonsChunkPlugin but webpack.optimize.CommonsChunkPlugin

References:

Comments