webpack-bundle-analyzer
webpack-bundle-analyzer copied to clipboard
It looks like all code is inlined in my entry point
Issue description
The visualization in stats
mode looks like expected:
But in parsed
mode, it seems to indicate that most code is inlined into index.js
(which is the entry point for the UMD library):
Is this a bug in webpack-bundle-analyzer
or does the parsed
mode accurately reflect the structure of the output bundle?
Any idea what could be causing this (especially if it isn't a bug)?
Technical info
System: OS: Linux 5.8 Debian GNU/Linux 10 (buster) 10 (buster) CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 46.31 GB / 62.50 GB Container: Yes Shell: 5.0.3 - /bin/bash Binaries: Node: 14.11.0 - ~/node-v14.11.0-linux-x64/bin/node npm: 6.14.8 - ~/node-v14.11.0-linux-x64/bin/npm npmPackages: webpack: ^5.20.0 => 5.20.0 webpack-bundle-analyzer: ^4.4.0 => 4.4.0 webpack-cli: ^4.5.0 => 4.5.0
Debug info
Just in case, I set optimization.concatenateModules
and devtool
to false
in the webpack configuration, and then ran:
npx webpack --profile --json > dist/stats.json
cd dist
npx webpack-bundle-analyzer stats.json
(Note that if stats.json
isn't in the same directory as where webpack puts the bundles, the webpack-bundle-analyzer
CLI won't find them. Another bug?)
The source code of the project is available here.
Note that if
stats.json
isn't in the same directory as where webpack puts the bundles, thewebpack-bundle-analyzer
CLI won't find them. Another bug?
In this case you need to specify [bundleDir]
CLI parameter: https://github.com/webpack-contrib/webpack-bundle-analyzer#options-for-cli