mirror of
https://github.com/vitejs/vite.git
synced 2024-11-22 07:09:05 +00:00
11 lines
390 B
JavaScript
11 lines
390 B
JavaScript
import os from 'node:os'
|
|
|
|
const isWindows = os.platform() === 'win32'
|
|
const nodeVersionArray = process.versions.node.split('.')
|
|
// ignore some files due to https://github.com/nodejs/node/issues/48673
|
|
// node <=21.0.0 and ^20.4.0 has the bug
|
|
export const hasWindowsUnicodeFsBug =
|
|
isWindows &&
|
|
(+nodeVersionArray[0] > 20 ||
|
|
(+nodeVersionArray[0] === 20 && +nodeVersionArray[1] >= 4))
|