webpack Stats Data

webpack Stats Data

If you have not heard of or used webpack stats data command before then it is time to take a look into it. The command generates a JSON file which contains detailed information and statistics about the modules used within the application.

 webpack --profile --json > compilation-stats.json

Stats Data command is an invaluable tool to try to understand and analyse an applications dependencies graph which is the most handy tool we can have when doing any deep level application debugging. From the output we can also dig down into any compilation speed issues we have.

The documentation page for stats data on webpack is very descriptive have a read through of the page for information on the file structure and options.

https://webpack.js.org/api/stats/