diff --git a/src/utils.ts b/src/utils.ts index f66bca3..496f82d 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -97,7 +97,7 @@ function linkPriority(module: Preload) { } export function sortPreloads(modules: Preload[]) { - return modules.toSorted((a, b) => { + return [...modules].sort((a, b) => { return linkPriority(b) - linkPriority(a); }); }