webpack-bundle-tracker icon indicating copy to clipboard operation
webpack-bundle-tracker copied to clipboard

Ensure ordering of keys in JSON output

Open dolan-a opened this issue 5 years ago • 0 comments

I've found that the ordering of keys is not guaranteed when outputting the stats file, and this doesn't work well with storing the JSON file in a version control system (i.e., git) since the file can change with subsequent runs of building.

This SO post has several solutions for ensuring the order, such as sorting things before calling JSON.stringify or using a 3rd party library, json-stable-stringify.

Is this something you'd support adding?

dolan-a avatar Jul 23 '20 13:07 dolan-a