Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix: add timeouts back
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Mar 15, 2022
1 parent 43833b8 commit 9acb39f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/bridge/src/vite/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export async function buildServer (ctx: ViteBuildContext) {
consola.info(`Server built in ${time}ms`)
await onBuild()
}
const doBuild = pDebounce(pDebounce.promise(_doBuild), 1)
const doBuild = pDebounce(pDebounce.promise(_doBuild), 300)

// Initial build
await _doBuild()
Expand Down
2 changes: 1 addition & 1 deletion packages/nitro/src/server/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export function createDevServer (nitroContext: NitroContext) {
let watcher: FSWatcher
function watch () {
if (watcher) { return }
const dReload = debounce(debounce.promise(() => reload().catch(console.warn)), 1, { before: true })
const dReload = debounce(debounce.promise(() => reload().catch(console.warn)), 200, { before: true })
watcher = chokidar.watch([
resolve(nitroContext.output.serverDir, pattern),
resolve(nitroContext._nuxt.buildDir, 'dist/server', pattern)
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export async function buildServer (ctx: ViteBuildContext) {
logger.success(`Vite server built in ${time}ms`)
await onBuild()
}
const doBuild = pDebounce(pDebounce.promise(_doBuild), 1)
const doBuild = pDebounce(pDebounce.promise(_doBuild), 100)

// Initial build
await _doBuild()
Expand Down

0 comments on commit 9acb39f

Please sign in to comment.