diff --git a/packages/open-next/src/utils/regex.ts b/packages/open-next/src/utils/regex.ts index 37c00dfcb..1f22629a2 100644 --- a/packages/open-next/src/utils/regex.ts +++ b/packages/open-next/src/utils/regex.ts @@ -17,7 +17,7 @@ type Options = { */ export function getCrossPlatformPathRegex( regex: string, - { escape: shouldEscape = true, flags = "g" }: Options = {}, + { escape: shouldEscape = true, flags = "" }: Options = {}, ) { const newExpr = ( shouldEscape ? regex.replace(/([[\]().*+?^$|{}\\])/g, "\\$1") : regex