bonsai

Webpack Stats File

For simple Webpack projects you can generate a stats file using webpack --json > stats.json. This will create stats.json in your current directory with all the data from your project. If you have a custom configuration you might need to tell Webpack about that, webpack --json --config webpack.config.js > stats.json. See https://webpack.js.org for more help.

What’s in the stats file?

As example of the stats file can be found inside the Bonsai repo itself right here.

The stats file contains full file paths, the file sizes, and the relationships between each of the modules in your project. The online Bonsai analyser reads this data locally in your browser and doesn’t upload anything.

Other tools

There are some other tools that have preceded Bonsai, and might also be helpful in your project.