slawo/chrome-dev-webpack-plugin

Webpack4 support

JimBledsoe opened this issue · 0 comments

Webpack 3 works just fine with the current version, but Webpack4 does not.

Webpack4 made many breaking changes to the bundling process:

  1. The CommonsChunk plugin has been deprecated. The webpack configs are no longer compatible between v3 and v4.
  2. The new bundler uses chunkGroups to handle most of the work of parsing through the chunks manually and the chunk.getParents() method has been deprecated.

This solution was crafted off the master branch before I noticed there was an abandoned devel branch that addressed several other issues already. The devel branch was refactored significantly, so this solution would also have to be refactored to become part of the devel branch. If I was to do this again, I probably would not have made V3/V4 references and just stuck with chunk/chunkGroup references.

Submitting this as reference for others who wish to continue to use this plugin with webpack 4.