chore(bytecodePlugin): KiB to kB

This commit is contained in:
alex8088 2022-12-28 21:27:53 +08:00
parent edd9ccb286
commit a5de5b36f5

View file

@ -296,10 +296,10 @@ export function bytecodePlugin(options: BytecodeOptions = {}): Plugin | null {
if (len > longest) longest = len if (len > longest) longest = len
}) })
bytecodeFiles.forEach(file => { bytecodeFiles.forEach(file => {
const kibs = file.size / 1024 const kbs = file.size / 1000
config.logger.info( config.logger.info(
`${colors.gray(colors.white(colors.dim(outDir)))}${colors.green(file.name.padEnd(longest + 2))} ${ `${colors.gray(colors.white(colors.dim(outDir)))}${colors.green(file.name.padEnd(longest + 2))} ${
kibs > chunkLimit ? colors.yellow(`${kibs.toFixed(2)} KiB`) : colors.dim(`${kibs.toFixed(2)} KiB`) kbs > chunkLimit ? colors.yellow(`${kbs.toFixed(2)} kB`) : colors.dim(`${kbs.toFixed(2)} kB`)
}` }`
) )
}) })