mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
We can add this back now (should fix CI)
This commit is contained in:
@@ -41,6 +41,30 @@ function printResults() {
|
||||
chalk.gray.yellow('Diff'),
|
||||
],
|
||||
});
|
||||
currentBuildResults.bundleSizes.forEach(index => {
|
||||
const result = currentBuildResults.bundleSizes[index];
|
||||
const prev = prevBuildResults.bundleSizes.filter(
|
||||
res => res.filename === result.filename
|
||||
)[0];
|
||||
if (result === prev) {
|
||||
// We didn't rebuild this bundle.
|
||||
return;
|
||||
}
|
||||
|
||||
const size = result.size;
|
||||
const gzip = result.gzip;
|
||||
let prevSize = prev ? prev.size : 0;
|
||||
let prevGzip = prev ? prev.gzip : 0;
|
||||
table.push([
|
||||
chalk.white.bold(`${result.filename} (${result.bundleType}`),
|
||||
chalk.gray.bold(filesize(prevSize)),
|
||||
chalk.white.bold(filesize(size)),
|
||||
percentChange(prevSize, size),
|
||||
chalk.gray.bold(filesize(prevGzip)),
|
||||
chalk.white.bold(filesize(gzip)),
|
||||
percentChange(prevGzip, gzip),
|
||||
]);
|
||||
});
|
||||
return table.toString();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user