Skip to content

Commit

Permalink
fix: make import resolution failures easier to track down (#2450)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris authored Mar 13, 2021
1 parent 5ec13d8 commit f6ac860
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vite/src/node/plugins/importAnalysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {

if (!resolved) {
this.error(
`Failed to resolve import "${url}". Does the file exist?`,
`Failed to resolve import "${url}" from "${path.relative(
process.cwd(),
importer
)}". Does the file exist?`,
pos
)
}
Expand Down

0 comments on commit f6ac860

Please sign in to comment.