MCPcopy
hub / github.com/vitejs/vite / debouncedProcessing

Function debouncedProcessing

packages/vite/src/node/optimizer/optimizer.ts:616–630  ·  view source on GitHub ↗
(timeout = debounceMs)

Source from the content-addressed store, hash-verified

614 }
615
616 function debouncedProcessing(timeout = debounceMs) {
617 // Debounced rerun, let other missing dependencies be discovered before
618 // the next optimizeDeps run
619 enqueuedRerun = undefined
620 if (debounceProcessingHandle) clearTimeout(debounceProcessingHandle)
621 if (newDepsToLogHandle) clearTimeout(newDepsToLogHandle)
622 newDepsToLogHandle = undefined
623 debounceProcessingHandle = setTimeout(() => {
624 debounceProcessingHandle = undefined
625 enqueuedRerun = rerun
626 if (!currentlyProcessing) {
627 enqueuedRerun()
628 }
629 }, timeout)
630 }
631
632 // onCrawlEnd is called once when the server starts and all static
633 // imports after the first request have been crawled (dynamic imports may also

Callers 3

createDepsOptimizerFunction · 0.85
registerMissingImportFunction · 0.85
onCrawlEndFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected