chore(recorder): support HMR (#33637)
This commit is contained in:
Родитель
acd862c6c9
Коммит
150092438f
|
@ -88,7 +88,7 @@ export class RecorderApp extends EventEmitter implements IRecorderApp {
|
|||
});
|
||||
|
||||
const mainFrame = this._page.mainFrame();
|
||||
await mainFrame.goto(serverSideCallMetadata(), 'https://playwright/index.html');
|
||||
await mainFrame.goto(serverSideCallMetadata(), process.env.PW_HMR ? 'http://localhost:44225' : 'https://playwright/index.html');
|
||||
}
|
||||
|
||||
static factory(context: BrowserContext): IRecorderAppFactory {
|
||||
|
|
|
@ -342,6 +342,13 @@ if (watchMode) {
|
|||
cwd: path.join(__dirname, '..', '..', 'packages', 'html-reporter'),
|
||||
concurrent: true,
|
||||
});
|
||||
steps.push({
|
||||
command: 'npx',
|
||||
args: ['vite', '--port', '44225'],
|
||||
shell: true,
|
||||
cwd: path.join(__dirname, '..', '..', 'packages', 'recorder'),
|
||||
concurrent: true,
|
||||
});
|
||||
}
|
||||
|
||||
// Generate injected.
|
||||
|
|
Загрузка…
Ссылка в новой задаче