fix(ct): update regex to cater for minified JS files (#22017)
This commit is contained in:
parent
bfea952eef
commit
02db6882ec
|
|
@ -41,7 +41,7 @@ type CtConfig = BasePlaywrightTestConfig['use'] & {
|
|||
ctViteConfig?: InlineConfig | (() => Promise<InlineConfig>);
|
||||
};
|
||||
|
||||
const importReactRE = /(^|\n)import\s+(\*\s+as\s+)?React(,|\s+)/;
|
||||
const importReactRE = /(^|\n|;)import\s+(\*\s+as\s+)?React(,|\s+)/;
|
||||
const compiledReactRE = /(const|var)\s+React\s*=/;
|
||||
|
||||
export function createPlugin(
|
||||
|
|
|
|||
Loading…
Reference in a new issue