Webpack-bundle-analyzer: Document webpack-dev-server interplay only displaying stat sizes

Created on 15 Jun 2018  Â·  2Comments  Â·  Source: webpack-contrib/webpack-bundle-analyzer

The closed issue #147 has some valuable comments about webpack-bundle-analyzer only showing stat sizes when bundle output does not go to the filesystem.

It would be valuable to document this caveat in the README.md.

This contribution opportunity has been seized by @fanich37

Please avoid creating competing pull requests


Here's some background from the linked issue:

@jeron-diovis in https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/147#issuecomment-380737178

Just ran into this issue using analyzer with webpack-dev-server. No angular or things like this.

The problem is that analyzer uses physical files to calc parsed/gzipped sizes – while webpack-dev-server keeps everything in memory.

Second problem is that being used as plugin, analyzer shows no errors, while CLI tools says Couldn't parse bundle asset.

As I understand, there is nothing analyzer can do with webpack-dev-server, but maybe it's worth to explicitly mention in docs that you should have files on disc to get parsed/gzipped info?

@Macil in https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/147#issuecomment-397444503

I was using webpack with gulp and compiler.outputFileSystem = new MemoryFS(); so that webpack wouldn't write the bundles itself, so I ran into the same issue as @jeron-diovis. The BundleAnalyzerPlugin didn't report any errors at all in the console, just silently produced stat-sized-only reports. I had to use webpack-bundle-analyzer on the command line on the profile json in order to see any kind of error message, which I only thought to do because of this thread.

Ready for PR Community help wanted good first issue Documentation

All 2 comments

Hi, @valscion . May I take this one?

Sure! :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

valscion picture valscion  Â·  6Comments

muuvmuuv picture muuvmuuv  Â·  3Comments

s524797336 picture s524797336  Â·  8Comments

gaokun picture gaokun  Â·  5Comments

musso picture musso  Â·  10Comments