Skip to content

Commit

Permalink
Resolve Node builtins from project root
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Aug 24, 2022
1 parent bbbfd55 commit eddc73f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/utils/node-resolver-core/src/NodeResolver.js
Expand Up @@ -291,7 +291,11 @@ export default class NodeResolver {
// Resolve the module in node_modules
let resolved: ?Module;
try {
resolved = this.findNodeModulePath(filename, sourceFile, ctx);
resolved = this.findNodeModulePath(
filename,
builtin == null ? sourceFile : this.projectRoot + '/index',
ctx,
);
} catch (err) {
// ignore
}
Expand Down

0 comments on commit eddc73f

Please sign in to comment.