Update index.js

This commit is contained in:
Jason Miller 2018-08-01 11:10:45 -04:00 committed by GitHub
parent 6f16a0d5d2
commit 1920e2d9bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,7 +135,7 @@ export default async function microbundle(options) {
}
function formatSize(size, filename, type) {
const pretty = size < 5000 ? `${size} B` : prettyBytes(size);
const pretty = options.raw ? `${size} B` : prettyBytes(size);
const color = size < 5000 ? 'green' : size > 40000 ? 'red' : 'yellow';
const MAGIC_INDENTATION = type === 'br' ? 13 : 10;
return `${' '.repeat(MAGIC_INDENTATION - pretty.length)}${chalk[color](