diff --git a/src/rules.ts b/src/rules.ts index 4983a8ab48..e90f3e25d0 100644 --- a/src/rules.ts +++ b/src/rules.ts @@ -16,10 +16,10 @@ function edit(regex: string | RegExp, opt = '') { return obj; } -const supportsLookbehind = (() => { +// use a default variable to ensure the regex is evaluated on client an not removed by minifiers +const supportsLookbehind = ((a = '') => { try { - // eslint-disable-next-line prefer-regex-literals - return !!new RegExp('(?<=1)(?