diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts index 6a82b55a1d91d7..fa75408fafbaff 100644 --- a/packages/vite/src/node/server/index.ts +++ b/packages/vite/src/node/server/index.ts @@ -1251,15 +1251,15 @@ function setupOnCrawlEnd(onCrawlEnd: () => void): CrawlEndFinder { if (ignoredId) { seenIds.add(ignoredId) markIdAsDone(ignoredId) + } else { + checkIfCrawlEndAfterTimeout() } return onCrawlEndPromiseWithResolvers.promise } function markIdAsDone(id: string): void { - if (registeredIds.has(id)) { - registeredIds.delete(id) - checkIfCrawlEndAfterTimeout() - } + registeredIds.delete(id) + checkIfCrawlEndAfterTimeout() } function checkIfCrawlEndAfterTimeout() {