This commit is contained in:
Norbert de Langen 2023-06-19 22:14:07 +02:00
parent 9619db23a7
commit cc07e57e05
No known key found for this signature in database
GPG Key ID: FD0E78AF9A837762
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,4 @@
import detectFreePort from 'detect-port';
import waitOn from 'wait-on';
import type { Task } from '../task';
import { exec } from '../utils/exec';
@ -29,6 +28,7 @@ export const dev: Task = {
// If aborted, we want to make sure the rejection is handled.
if (!err.killed) throw err;
});
const { waitOn } = await import('wait-on');
await waitOn({ resources: [`http://localhost:${PORT}/iframe.html`], interval: 50 });
const time = now() - start;

View File

@ -23,7 +23,7 @@ export const serve: Task = {
// If aborted, we want to make sure the rejection is handled.
if (!err.killed) throw err;
});
const waitOn = await import('wait-on');
const { waitOn } = await import('wait-on');
await waitOn({ resources: [`http://localhost:${PORT}`], interval: 50 });
return controller;