Just for entertainment:
- Compile with
webpack --profile --json > stats.json
(node.js API:
{ profile: true }
andstats.toJson()
) - Go to http://webpack.github.io/analyse/#modules
- Load your stats file (It’s not uploaded, the analyse tools is a client only tool).
- Wait a bit until the graph has been stabilized.
- Screenshot and cut the graph area.
- Post it into this thread.
@sokra I get this error when I load my stats.json after CSS optimization (the optimization causes the stats.json to become invalid):
Thoughts?
@SilentCicero : I had the same problem. I discovered that my process was dumping junk into the same file with the JSON, so it wasn’t producing valid JSON. I manually edited my file, then used a JSON parser to validate it. After that, it worked great.
I am imagining the same visualization from a VR. Wherein user can shrink the and expand the dots using hand gestures. Just like tony stark in Iron man movie.
@imvetri our app has a threejs graph viz in it that works on cardboard, need to make format consume this but yet i will demo it soon 🙂
FYI @alexkuz wrote a beautiful 3D visualization for
stats.json
, check it out:https://alexkuz.github.io/stellar-webpack/
@gaearon seems its not working anymore. JS is throwing 500 errors per sec.
I was playing with this, and wondering if I could do a bit more with it, so built this converter from stats.json to GDF so I could open it in Gephi. It’ll allow you to delete nodes you don’t care about, etc. so you can look at things in more detail. Currently doesn’t export that much information, but open to suggestions on further things to export. Fun to play with either way 🙂
Alright, wanted to make something prettier before I commented…
Modules colored by chunks, and sized according to module size.

Filtering the modules down to only those in the common chunk.

I can see from these that we have a few rather large dependencies (jquery is one) and that the common bundle has a larger one that’s kind of loosely connected and can potentially be removed from page load a majority of the time…🙌
Different arrangement…

https://github.com/elastic/kibana
webpack 1.12.15
34045 ms
3475 modules
11 chunks
80 assets
I hit “choose file” and it selects, but then nothing happens. I don’t get a next button or any progress. My stats file is around 12mb. Is this tool still working?
Edit: I checked the console log on the page and saw a syntax error in the json. If you do ANY console logging from your webpack setup or plugins, this breaks. I was able to edit the stats json file to trim off my console logs and it worked.
duh
I’ve got “Cannot read property ‘parents’ of undefined” error in console

I’m having a lot of trouble getting https://webpack.github.io/analyse/ to analyze my stats.json file.

I keep getting this error:
Considering the comment above, I have to ask wether this tool is updated?
Otherwise, I may of course be wrong. Here’s what I do in my build.js script (webpack 3.8.1):
Is there a way to have my CI server produce this graph as a build artifact, a la webpack-bundle-analyzer?