We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ede9893 commit 07258ffCopy full SHA for 07258ff
src/index.ts
@@ -243,8 +243,9 @@ function removeQuerystring(id: string) {
243
244
const isFile = (path?: string | undefined): path is string => {
245
try {
246
- return !!path && fs.statSync(path).isFile()
+ return !!(path && fs.statSync(path, { throwIfNoEntry: false })?.isFile())
247
} catch {
248
+ // Node 12 does not support throwIfNoEntry.
249
return false
250
}
251
0 commit comments