chore: fix size reporting for brotli

This commit is contained in:
Evan You 2023-02-02 20:54:39 +08:00
parent c1cbb747b5
commit a5dcbad614
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ function checkFileSize(filePath) {
const gzipped = gzipSync(file)
const gzippedSize = (gzipped.length / 1024).toFixed(2) + 'kb'
const compressed = compress(file)
const compressedSize = (compressed?.length || 0 / 1024).toFixed(2) + 'kb'
const compressedSize = (compressed?.length / 1024).toFixed(2) + 'kb'
console.log(
`${chalk.gray(
chalk.bold(path.basename(filePath))