doesdev / rollup-plugin-analyzer

Mad metrics for your rollup bundles, know all the things
http://rollup-plugin-analyzer.doesdev.com
MIT License
242 stars 4 forks source link

fix (1024 kb) use 1024 to calculate kb filesize #27

Closed potench closed 1 year ago

potench commented 1 year ago

Background

The bundle-analyzer report is returning incorrect file size. 1kb = 1024 bytes but the report is returning as 1kb = 1000 bytes. Example

Rollup File Analysis
-----------------------------
bundle size:    73.231 KB 
original size:  80.907 KB
code reduction: 9.49 %
module count:   36
ChatGPT confirms for file-size to use 1024kb Screenshot 2023-04-27 at 5 08 50 PM

Solution

Just change 1000 to 1024.

Test Plan

yarn test