Skip to content

Commit

Permalink
perf: use safeRealpath in getRealpath (#12551)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Mar 23, 2023
1 parent eac376e commit cec2320
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 @@ -1264,7 +1264,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 cec2320

Please sign in to comment.