Skip to content

Commit cec2320

Browse files
authoredMar 23, 2023
perf: use safeRealpath in getRealpath (#12551)
1 parent eac376e commit cec2320

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/vite/src/node/plugins/resolve.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,7 @@ function equalWithoutSuffix(path: string, key: string, suffix: string) {
12641264
function getRealPath(resolved: string, preserveSymlinks?: boolean): string {
12651265
resolved = ensureVolumeInPath(resolved)
12661266
if (!preserveSymlinks && browserExternalId !== resolved) {
1267-
resolved = fs.realpathSync(resolved)
1267+
resolved = safeRealpathSync(resolved)
12681268
}
12691269
return normalizePath(resolved)
12701270
}

0 commit comments

Comments
 (0)
Please sign in to comment.