webpack-visualizer icon indicating copy to clipboard operation
webpack-visualizer copied to clipboard

Cannot read property 'size' of undefined

Open peter-mouland opened this issue 8 years ago • 1 comments

Hey,

The visualizer seems to have stopped working for our stats file using "webpack-visualizer-plugin": "^0.1.11"

Stats.json Gist

the error points to: raw:e.reduce(function(t,e){return t+e.chunk.size},0)} in the minified code.

I'm not sure what's caused it, is this a known issue?

peter-mouland avatar Aug 03 '17 14:08 peter-mouland

I've seen at this point, e does not have a chunk and looks like:

{"name":"static/jquery-1.12.1.min.js","size":97403,"chunks":[],"chunkNames":[],"emitted":true}

I've noticed in our webpack config we use copy-webpack-plugin and:

    new CopyWebpackPlugin([
      { from: 'static', to: 'static' }
    ]),

It looks like these files are making there way into the stats in a format that isn't being handled

peter-mouland avatar Aug 03 '17 14:08 peter-mouland