diff --git a/core/utils/cdn-resolution.ts b/core/utils/cdn-resolution.ts index 2baba8a..01e1a5f 100644 --- a/core/utils/cdn-resolution.ts +++ b/core/utils/cdn-resolution.ts @@ -317,12 +317,12 @@ export function applyBrowserRemapping( if (!remappings || !resolvedPath) return resolvedPath; // Try multiple path variants for matching - const variants = [ + const variants = new Set([ resolvedPath, resolvedPath.replace(/^\.\//, ""), resolvedPath.startsWith("./") ? resolvedPath : `./${resolvedPath.replace(/^\//, "")}`, resolvedPath.replace(/^\//, ""), - ]; + ]); for (const variant of variants) { if (variant in remappings) {