mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
fix
This commit is contained in:
parent
9619db23a7
commit
cc07e57e05
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user