Update vite.config.ts
Some checks failed
Security Gate: Secret Scanning / Scan for Verified Secrets (push) Has been cancelled

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Val Alexander 2026-05-02 11:58:10 -05:00 committed by GitHub
parent 7397d2eccc
commit 00e0c77fed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -142,13 +142,24 @@ function patchArkSafariInOperator(): Plugin {
if (!fix) return null;
let nextCode = code;
let patchedAny = false;
const missingPatterns: string[] = [];
for (const [from, to] of fix.replacements) {
if (!nextCode.includes(from)) {
this.error(`Expected to patch ${from} in ${normalizedId}`);
missingPatterns.push(from);
continue;
}
nextCode = nextCode.replaceAll(from, to);
patchedAny = true;
}
if (missingPatterns.length > 0) {
this.warn(
`Skipped ${missingPatterns.length} ark safari patch replacement(s) in ${normalizedId}: ${missingPatterns.join(", ")}`,
);
}
if (!patchedAny) return null;
return {
code: nextCode,
map: null,