chore(recorder): support HMR (#33637)
This commit is contained in:
parent
acd862c6c9
commit
150092438f
|
|
@ -88,7 +88,7 @@ export class RecorderApp extends EventEmitter implements IRecorderApp {
|
||||||
});
|
});
|
||||||
|
|
||||||
const mainFrame = this._page.mainFrame();
|
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 {
|
static factory(context: BrowserContext): IRecorderAppFactory {
|
||||||
|
|
|
||||||
|
|
@ -342,6 +342,13 @@ if (watchMode) {
|
||||||
cwd: path.join(__dirname, '..', '..', 'packages', 'html-reporter'),
|
cwd: path.join(__dirname, '..', '..', 'packages', 'html-reporter'),
|
||||||
concurrent: true,
|
concurrent: true,
|
||||||
});
|
});
|
||||||
|
steps.push({
|
||||||
|
command: 'npx',
|
||||||
|
args: ['vite', '--port', '44225'],
|
||||||
|
shell: true,
|
||||||
|
cwd: path.join(__dirname, '..', '..', 'packages', 'recorder'),
|
||||||
|
concurrent: true,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate injected.
|
// Generate injected.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue