Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit e8592c7

Browse files
committed
fix: only catch missing cts/mts error
1 parent eed2289 commit e8592c7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ Module._resolveFilename = function (request, parent, isMain, options) {
9191
isMain,
9292
options,
9393
);
94-
} catch {}
94+
} catch (error) {
95+
if ((error as any).code !== 'MODULE_NOT_FOUND') {
96+
throw error;
97+
}
98+
}
9599
}
96100

97101
return resolveFilename.call(this, request, parent, isMain, options);

0 commit comments

Comments
 (0)