chore: provisional fix for win install test failure (#29175)
This commit is contained in:
parent
b5e175e6e2
commit
24ff2e2bad
|
|
@ -44,7 +44,7 @@ export async function runDevServer(configFile: string, registerSourceFile: strin
|
|||
const componentRegistry: ComponentRegistry = new Map();
|
||||
await populateComponentsFromTests(componentRegistry);
|
||||
|
||||
const dirs = resolveDirs(config.configDir, config.config);
|
||||
const dirs = await resolveDirs(config.configDir, config.config);
|
||||
const registerSource = injectedSource + '\n' + await fs.promises.readFile(registerSourceFile, 'utf-8');
|
||||
const viteConfig = await createConfig(dirs, config.config, frameworkPluginFactory, false);
|
||||
viteConfig.plugins.push({
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ export function createPlugin(
|
|||
}
|
||||
}
|
||||
|
||||
const dirs = resolveDirs(configDir, config);
|
||||
const dirs = await resolveDirs(configDir, config);
|
||||
const buildInfoFile = path.join(dirs.outDir, 'metainfo.json');
|
||||
|
||||
let buildExists = false;
|
||||
|
|
|
|||
|
|
@ -38,13 +38,13 @@ export type ComponentDirs = {
|
|||
templateDir: string;
|
||||
};
|
||||
|
||||
export function resolveDirs(configDir: string, config: FullConfig): ComponentDirs {
|
||||
export async function resolveDirs(configDir: string, config: FullConfig): Promise<ComponentDirs> {
|
||||
const use = config.projects[0].use as CtConfig;
|
||||
// FIXME: use build plugin to determine html location to resolve this.
|
||||
// TemplateDir must be relative, otherwise we can't move the final index.html into its target location post-build.
|
||||
// This regressed in https://github.com/microsoft/playwright/pull/26526
|
||||
const relativeTemplateDir = use.ctTemplateDir || 'playwright';
|
||||
const templateDir = path.join(configDir, relativeTemplateDir);
|
||||
const templateDir = await fs.promises.realpath(path.normalize(path.join(configDir, relativeTemplateDir)));
|
||||
const outDir = use.ctCacheDir ? path.resolve(configDir, use.ctCacheDir) : path.resolve(templateDir, '.cache');
|
||||
return {
|
||||
configDir,
|
||||
|
|
|
|||
Loading…
Reference in a new issue