Skip to content

Commit

Permalink
allow fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Dec 17, 2024
1 parent ff09f8b commit 0db7f02
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/vite/src/node/plugins/importAnalysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,7 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
} else {
try {
const [resolved] = await moduleGraph.resolveUrl(toAbsoluteUrl(url))
normalized = resolved
if (resolved) {
this.warn({
message:
Expand All @@ -779,9 +780,10 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
})
continue
}
} catch {}
this.error(`Failed to resolve ${JSON.stringify(url)}`, start)
return
} catch {
this.error(`Failed to resolve ${JSON.stringify(url)}`, start)
return
}
}
normalizedAcceptedUrls.add(normalized)
const hmrAccept = normalizeHmrUrl(normalized)
Expand Down

0 comments on commit 0db7f02

Please sign in to comment.