Skip to content

Commit

Permalink
Merge 5ba72b1 into bcd9fe8
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanis committed Jan 12, 2020
2 parents bcd9fe8 + 5ba72b1 commit 422fc22
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/resolve.js
Expand Up @@ -34,7 +34,11 @@ function tryRequire(target, sourceFile) {
try {
// Check if the target exists
if (sourceFile != null) {
resolved = createRequire(path.resolve(sourceFile)).resolve(target)
try {
resolved = createRequire(path.resolve(sourceFile)).resolve(target)
} catch (e) {
resolved = require.resolve(target)
}
} else {
resolved = require.resolve(target)
}
Expand Down

0 comments on commit 422fc22

Please sign in to comment.