mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 19:04:43 +03:00
chore: move vite root dir into template folder (#29081)
This commit is contained in:
parent
d89ed88679
commit
41c15cb176
@ -24,6 +24,6 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id='root'></div>
|
||||
<script type='module' src='/playwright/index.ts'></script>
|
||||
<script type='module' src='/index.ts'></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -76,8 +76,9 @@ export function createPlugin(
|
||||
|
||||
// Compose base config from the playwright config only.
|
||||
const baseConfig: InlineConfig = {
|
||||
root: configDir,
|
||||
root: templateDir,
|
||||
configFile: false,
|
||||
publicDir: path.join(configDir, 'public'),
|
||||
define: {
|
||||
__VUE_PROD_DEVTOOLS__: true,
|
||||
},
|
||||
@ -189,7 +190,6 @@ export function createPlugin(
|
||||
if (sourcesDirty) {
|
||||
log('build');
|
||||
await build(finalConfig);
|
||||
await fs.promises.rename(`${finalConfig.build.outDir}/${relativeTemplateDir}/index.html`, `${finalConfig.build.outDir}/index.html`);
|
||||
buildInfo.deps = Object.fromEntries(depsCollector.entries());
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ test('should work with the empty component list', async ({ runInlineTest }, test
|
||||
expect(result.passed).toBe(1);
|
||||
const output = result.output;
|
||||
expect(output).toContain('transforming...');
|
||||
expect(output.replace(/\\+/g, '/')).toContain('playwright/.cache/playwright/index.html');
|
||||
expect(output.replace(/\\+/g, '/')).toContain('.cache/index.html');
|
||||
|
||||
const metainfo = JSON.parse(fs.readFileSync(testInfo.outputPath('playwright/.cache/metainfo.json'), 'utf-8'));
|
||||
expect(metainfo.version).toEqual(require('playwright-core/package.json').version);
|
||||
|
Loading…
Reference in New Issue
Block a user