Update stats.ts (#1376)

This commit is contained in:
Fred K. Schott 2021-09-15 08:53:26 -07:00 committed by GitHub
parent 98d785af1d
commit 3a0dcbe9b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fix pretty byte output in build stats

View file

@ -86,7 +86,7 @@ export function logURLStats(logging: LogOptions, urlStats: URLStatsMap) {
.get(url)
?.stats.map((s) => s.gzipSize)
.reduce((a, b) => a + b, 0) || 0;
const sizePart = prettyBytes(bytes, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
const sizePart = prettyBytes(bytes);
log(info, urlPart, sizePart);
});
}