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 5ba7bf7Copy full SHA for 5ba7bf7
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()) || false;
247
} catch {
248
+ // Node 12 does not support throwIfNoEntry.
249
return false
250
}
251
@@ -331,8 +332,8 @@ function initMappers(options: InternalResolverOptions) {
331
332
typeof options.project === 'string'
333
? [options.project]
334
: Array.isArray(options.project)
- ? options.project
335
- : [process.cwd()]
+ ? options.project
336
+ : [process.cwd()]
337
338
const ignore = ['!**/node_modules/**']
339
0 commit comments