webpack.optimize.ModuleConcatenationPlugin is not a constructor

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

On my local machine I noticed no issues with the webpack upgrade, but travis fails each time since upgrade.

Travis cannot complete npm run test command, throws the following error

21 06 2017 20:16:31.514:ERROR [config]: Invalid config file!
TypeError: webpack.optimize.ModuleConcatenationPlugin is not a constructor
at Object. (/home/travis/build/…/webpack.prod.config.babel.js:91:3)
at Module._compile (module.js:569:30)
at loader (/home/travis/build/…/node_modules/babel-register/lib/node.js:144:5)

If the current behavior is a bug, please provide the steps to reproduce.

Updated to Webpack 3 and add the following snippet to webpack config

  // Webpack 3 Scope Hoisting
  new webpack.optimize.ModuleConcatenationPlugin(),

What is the expected behavior?

Travis not to fail

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

node: 8.1.2
npm: 5.0.3
webpack: 3.0.0

Author: Fantashit

2 thoughts on “webpack.optimize.ModuleConcatenationPlugin is not a constructor

  1. have same problem,

    webpack@3.4.1
    TypeError: webpack.optimize.ModuleConcatenationPlugin is not a constructor

    Resolve with: remove node_modules dirrectory, and reinstall dependencies.

Comments are closed.