diff --git a/packages/vite/src/node/utils.ts b/packages/vite/src/node/utils.ts index 843d06ed5c6159..76ab58ba92f9f9 100644 --- a/packages/vite/src/node/utils.ts +++ b/packages/vite/src/node/utils.ts @@ -606,9 +606,9 @@ function windowsSafeRealPathSync(path: string): string { } function optimizeSafeRealPathSync() { - // Skip if using Node <16.18 due to MAX_PATH issue: https://github.com/vitejs/vite/issues/12931 + // Skip if using Node <18.10 due to MAX_PATH issue: https://github.com/vitejs/vite/issues/12931 const nodeVersion = process.versions.node.split('.').map(Number) - if (nodeVersion[0] < 16 || (nodeVersion[0] === 16 && nodeVersion[1] < 18)) { + if (nodeVersion[0] < 18 || (nodeVersion[0] === 18 && nodeVersion[1] < 10)) { safeRealpathSync = fs.realpathSync return }