wcer icon indicating copy to clipboard operation
wcer copied to clipboard

support webpack v4

Open wheeljs opened this issue 7 years ago • 1 comments

In webpack 4, compiler.fileDependencies is an instance of SortableSet, which inherit from Set. So, when I use this plugin in webpack 4, I got a 'TypeError: comp.fileDependencies.push is not a function'. I fixed it by determining fileDependencies's type, if it is a SortableSet, use .add to add manifestPath, otherwise keep using .push.

wheeljs avatar Jul 23 '18 13:07 wheeljs

BTW, fileDependencies definition in webpack 4: https://github.com/webpack/webpack/blob/master/lib/Compilation.js#L2142 In webpack 3.12: https://github.com/webpack/webpack/blob/v3.12.0/lib/Compilation.js#L1249

wheeljs avatar Jul 23 '18 13:07 wheeljs