You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deprecated and removed getFileSizes function. getFiles now returns a size property
Need to use the -f or --filetype flag when specifying a main bundle filetype from the CLI (previously was the second CLI argument)
Use base 10 (previously base 2) as the default for converting bytes into a human readable format in the formatBytes function. Base 10 is what operating systems use in file explorers
Enhancements
CLI
Added support for CLI flags instead of passing arguments in a specific order (use the -h or --help flag for usage info)
Added -d and --decimals CLI flags for specifying decimals places when formatting bytes
Added -b and --binary CLI flags for converting bytes to a human readable format in base 2
Added -o and --outfile CLI flags for saving the build size data to CSV
Log build on-disk size to the console for non-windows machines (uses du)
Log compressed main bundle sizes to the console
Spiffed up the build-sizes formatting that is logged to the console
New exported functions
saveBuildSizes: saves build-sizes data to CSV
getFileSizeGzip: calculates a file's gzipped size (with zlib defaults)
getFileSizeBrotli: calculates a file's brotli compressed size (with zlib defaults)
New function return properties
mainBundleSizeGzip (from getBuildSizes): main bundle's gzipped size
mainBundleSizeBrotli from getBuildSizes): main bundle's brotli compressed size
buildSizeOnDisk (from getBuildSizes): build's on-disk size (NaN on windows since it uses a unix command)