Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/vite/src/node/plugins/importAnalysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,11 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
url = resolved.id.slice(root.length)
} else if (
depsOptimizer?.isOptimizedDepFile(resolved.id) ||
(path.isAbsolute(cleanUrl(resolved.id)) &&
// resolved virtual id convention, ie /@vite/client, /@react-refresh, /@vite-plugin-pwa
// We don't support absolute paths starting with `/@` at the root of the file system to avoid
// expensive fs checks
(!resolved.id.startsWith('/@') &&
path.isAbsolute(resolved.id) &&
fs.existsSync(cleanUrl(resolved.id)))
) {
// an optimized deps may not yet exists in the filesystem, or
Expand Down