We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
/@fs/
1 parent d3af879 commit 2a519a1Copy full SHA for 2a519a1
packages/vite/src/node/plugins/importAnalysis.ts
@@ -335,7 +335,8 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
335
url = resolved.id.slice(root.length)
336
} else if (
337
depsOptimizer?.isOptimizedDepFile(resolved.id) ||
338
- fs.existsSync(cleanUrl(resolved.id))
+ (path.isAbsolute(cleanUrl(resolved.id)) &&
339
+ fs.existsSync(cleanUrl(resolved.id)))
340
) {
341
// an optimized deps may not yet exists in the filesystem, or
342
// a regular file exists but is out of root: rewrite to absolute /@fs/ paths
0 commit comments