Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: build time deps optimization, and ensure single crawl end call #12851

Merged
merged 8 commits into from
Apr 14, 2023
Prev Previous commit
Next Next commit
chore: clean up
  • Loading branch information
patak-dev committed Apr 14, 2023
commit 475131f6ecf90f59ce625a87ceb59e61a311a5f1
7 changes: 0 additions & 7 deletions packages/vite/src/node/optimizer/optimizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,16 +693,9 @@ async function createDepsOptimizer(
}

// Called during buildStart at build time, when build --watch is used.
// Once during dev mode.
function resetRegisteredIds() {
crawlEndFinder?.cancel()
crawlEndFinder = setupOnCrawlEnd(onCrawlEnd)

// Cancel on-fly queued reruns. This shouldn't currently happen but makes
// the API of the optimizer more robust in case resetRegisteredIds wouldn't
// be called before the first request in dev mode
if (debounceProcessingHandle) clearTimeout(debounceProcessingHandle)
enqueuedRerun = undefined
}

function registerWorkersSource(id: string) {
Expand Down