-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report post-minified sizes #13
Comments
Unfortunately this isn't really possible - at least with the website version of this tool. Webpack's stats.json includes data about each module (where it sits in your node_modules, why it was included, post-loader size and source), but minification happens in a plugin, which is executed on the full bundle. It includes the names and final sizes of the final generated assets - but that's about it. Some bad options:
The webpack plugin version of this tool might have a shot at doing this since it has access to more info than just the stats.json file. I'll see if I can look into that at least. There are some alternative approaches out there, such as analyzing your source maps - see source-map-explorer. Maybe that's the way to go.... |
|
@jdalton I don't think so - the sizes for each file look exactly the same. |
Ah you're right. So then webpack-bundle-analyzer maybe. From its readme:
|
Yeah, the plugin is the way to go here, since it has access to more info than stats.json has. |
We're now displaying actual/minfied sizes in most cases. Unfortunately it's just an esimate based on the raw percentages - but comparing with some tools that have the ability to be more accurate - the estimate is pretty close - usually within 1K for bigger modules. I'm not sure we'll be able to swing gzipped sizes for the web version, but we might make it happen for the plugin version. Discussion here: #23 |
It would really nice to have a visual tool such as webpack-visualizer with the preciceness of webpack-bundle-analyzer! I found https://www.npmjs.com/package/webpack-bundle-analyzer-sunburst which comes close, but to be honest, webpack-visualizer has the best UX. |
In #9 you mentioned this reports pre-minified sizes.
It'd be great to see the sizes after minification instead, as most bundles are used in production.
The text was updated successfully, but these errors were encountered: