mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 05:37:20 +03:00
fix(ct): setting ctTemplateDir does not work (#18152)
closes: https://github.com/microsoft/playwright/issues/18116
This commit is contained in:
parent
2e84c63f0d
commit
46559a37c1
@ -291,7 +291,11 @@ function vitePlugin(registerSource: string, relativeTemplateDir: string, buildIn
|
||||
return { code, map: { mappings: '' } };
|
||||
}
|
||||
|
||||
if (!id.endsWith(`${relativeTemplateDir}/index.ts`) && !id.endsWith(`${relativeTemplateDir}/index.tsx`) && !id.endsWith(`${relativeTemplateDir}/index.js`))
|
||||
const indexTs = path.join(relativeTemplateDir, 'index.ts');
|
||||
const indexTsx = path.join(relativeTemplateDir, 'index.tsx');
|
||||
const indexJs = path.join(relativeTemplateDir, 'index.js');
|
||||
const idResolved = path.resolve(id);
|
||||
if (!idResolved.endsWith(indexTs) && !idResolved.endsWith(indexTsx) && !idResolved.endsWith(indexJs))
|
||||
return;
|
||||
|
||||
const folder = path.dirname(id);
|
||||
|
Loading…
Reference in New Issue
Block a user