fix: Fix regression where manifest was not listed first in build summary

This commit is contained in:
Aaron Klinker
2023-07-13 16:09:19 -05:00
parent 2d1c41eff1
commit fa2b6566d8
+5 -6
View File
@@ -57,9 +57,9 @@ const CHUNK_SORT_WEIGHTS: Record<string, number> = {
};
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, (text: string) => 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
);
}