You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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!
The text was updated successfully, but these errors were encountered:
Thanks for the report. I didn't know that it was possible to configure webpack in such a way that this information would be missing from the JSON output. It shouldn't be too difficult to to spit out a more helpful error message.
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
stats
key 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!
The text was updated successfully, but these errors were encountered: