Skip to content

Commit

Permalink
Lower the timeout and add a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
rozenmd committed Jul 4, 2022
1 parent d18736a commit 0eecc80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/wrangler/src/api/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ interface DevOptions {
_: (string | number)[]; //yargs wants this
$0: string; //yargs wants this
}

/**
* unstable_dev starts a wrangler dev server, and returns a promise that resolves with utility functions to interact with it.
* @param {string} script
* @param {DevOptions} options
*/
export async function unstable_dev(script: string, options: DevOptions) {
logger.warn(
`unstable_dev() is experimental\nunstable_dev()'s behaviour will likely change in future releases`
Expand Down
2 changes: 1 addition & 1 deletion packages/wrangler/src/dev/local.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ function useLocalWorker({
});
//TODO: instead of being lucky with spawn's timing, have miniflare-cli notify wrangler that it's ready in packages/wrangler/src/miniflare-cli/index.ts, after the mf.startScheduler promise resolves
if (onReady) {
await new Promise((resolve) => setTimeout(resolve, 5000));
await new Promise((resolve) => setTimeout(resolve, 300));
onReady();
}

Expand Down

0 comments on commit 0eecc80

Please sign in to comment.