From fa2b6566d883b4ce14c73d8ca2e9fc3af29226c3 Mon Sep 17 00:00:00 2001 From: Aaron Klinker Date: Thu, 13 Jul 2023 16:09:19 -0500 Subject: [PATCH] fix: Fix regression where manifest was not listed first in build summary --- src/core/log/printBuildSummary.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/core/log/printBuildSummary.ts b/src/core/log/printBuildSummary.ts index e738c89f..8990735a 100644 --- a/src/core/log/printBuildSummary.ts +++ b/src/core/log/printBuildSummary.ts @@ -57,9 +57,9 @@ const CHUNK_SORT_WEIGHTS: Record = { }; function getChunkSortWeight(filename: string) { return ( - Object.entries(CHUNK_SORT_WEIGHTS).find(([key, value]) => { - if (filename.endsWith(key)) return value; - })?.[1] ?? DEFAULT_SORT_WEIGHT + Object.entries(CHUNK_SORT_WEIGHTS).find(([key]) => + filename.endsWith(key), + )?.[1] ?? DEFAULT_SORT_WEIGHT ); } @@ -72,8 +72,7 @@ const CHUNK_COLORS: Record string> = { }; function getChunkColor(filename: string) { return ( - Object.entries(CHUNK_COLORS).find(([key, value]) => { - if (filename.endsWith(key)) return value; - })?.[1] ?? DEFAULT_COLOR + Object.entries(CHUNK_COLORS).find(([key]) => filename.endsWith(key))?.[1] ?? + DEFAULT_COLOR ); }