Skip to content

Commit

Permalink
perf: use safeRealpath in getRealpath
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Mar 23, 2023
1 parent 46d1352 commit be505f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/resolve.ts
Expand Up @@ -1263,7 +1263,7 @@ function equalWithoutSuffix(path: string, key: string, suffix: string) {
function getRealPath(resolved: string, preserveSymlinks?: boolean): string {
resolved = ensureVolumeInPath(resolved)
if (!preserveSymlinks && browserExternalId !== resolved) {
resolved = fs.realpathSync(resolved)
resolved = safeRealpathSync(resolved)
}
return normalizePath(resolved)
}

0 comments on commit be505f9

Please sign in to comment.