Hi!
I tried running webpack-bundle-size-analyzer against the output generated by my app for the first after some iterations, and was surprised by the following error:
λ webpack --json --verbose | webpack-bundle-size-analyzer
C:\Users\gustavo\AppData\Roaming\npm\node_modules\webpack-bundle-size-analyzer\build\src\size_tree.js:136
return stats.children.map(bundleSizeTree);
^
TypeError: Cannot read property 'map' of undefined
at Object.dependencySizeTree (C:\Users\gustavo\AppData\Roaming\npm\node_modules\webpack-bundle-size-analyzer\build\src\size_tree.js:136:30)
at printStats (C:\Users\gustavo\AppData\Roaming\npm\node_modules\webpack-bundle-size-analyzer\build\src\cli.js:14:30)
at Socket.<anonymous> (C:\Users\gustavo\AppData\Roaming\npm\node_modules\webpack-bundle-size-analyzer\build\src\cli.js:43:50)
...
One change I made was to hide most stats from the webpack logs with the stats key my webpack.config.js:
stats: {
assets: true,
children: false,
chunks: false,
errors: true,
errorDetails: true,
modules: false,
timings: true,
colors: true
}
Obviously this was the cause of the error above.
The only thing I found to work is to remove these. I haven't tried any combination of webpack CLI flags apart from --verbose --json (which didn't work).
It would be nice to document this problem and how to solve it, so others don't get into this trap as well.
And if you know about a more elegant way around this, let me know!
Hi!
I tried running webpack-bundle-size-analyzer against the output generated by my app for the first after some iterations, and was surprised by the following error:
One change I made was to hide most stats from the webpack logs with the
statskey mywebpack.config.js:Obviously this was the cause of the error above.
The only thing I found to work is to remove these. I haven't tried any combination of webpack CLI flags apart from
--verbose --json(which didn't work).It would be nice to document this problem and how to solve it, so others don't get into this trap as well.
And if you know about a more elegant way around this, let me know!