diff --git a/randomize.ts b/randomize.ts index 23c1c3f..9834baa 100644 --- a/randomize.ts +++ b/randomize.ts @@ -199,7 +199,7 @@ export function UpdateImports() { OriginalPatterns.forEach((pattern, index) => { content = content.replace( - new RegExp(`['"]${pattern.replace(/\./g, "\\.")}['"]`, "g"), + new RegExp(`['"]${pattern.replace(/\\/g, "\\\\").replace(/\./g, "\\.")}['"]`, "g"), `'${NewPatterns[index]}'`, ); });