Update vite.config.ts
Some checks failed
Security Gate: Secret Scanning / Scan for Verified Secrets (push) Has been cancelled
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:
parent
7397d2eccc
commit
00e0c77fed
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user