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

Commit

Permalink
fix: only catch missing cts/mts error
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed May 16, 2022
1 parent eed2289 commit e8592c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ Module._resolveFilename = function (request, parent, isMain, options) {
isMain,
options,
);
} catch {}
} catch (error) {
if ((error as any).code !== 'MODULE_NOT_FOUND') {
throw error;
}
}
}

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

0 comments on commit e8592c7

Please sign in to comment.