Ignore non-top-level identifiers early in Resolver#_resolveNodeModule.

This commit is contained in:
Ben Newman
2016-10-13 18:27:51 -04:00
parent ff0d822369
commit 7ea95063b0

View File

@@ -204,7 +204,9 @@ export default class Resolver {
}
_resolveNodeModule(id, absParentPath) {
let resolved = null;
if (! Resolver.isTopLevel(id)) {
return null;
}
if (Resolver.isNative(id) &&
archMatches(this.targetArch, "os")) {
@@ -234,6 +236,8 @@ export default class Resolver {
}
});
let resolved = null;
if (sourceRoot) {
let dir = absParentPath; // It's ok for absParentPath to be a directory!
let info = this._joinAndStat(dir);