|
|
@ -202,7 +202,10 @@ Module._resolveLookupPaths = function(request, parent) { |
|
|
|
var start = request.substring(0, 2); |
|
|
|
if (start !== './' && start !== '..') { |
|
|
|
var paths = Module._paths; |
|
|
|
if (parent) paths = paths.concat(parent.paths); |
|
|
|
if (parent) { |
|
|
|
if (!parent.paths) parent.paths = []; |
|
|
|
paths = parent.paths.concat(paths); |
|
|
|
} |
|
|
|
return [request, paths]; |
|
|
|
} |
|
|
|
|
|
|
@ -211,7 +214,7 @@ Module._resolveLookupPaths = function(request, parent) { |
|
|
|
// make require('./path/to/foo') work - normally the path is taken
|
|
|
|
// from realpath(__filename) but with eval there is no filename
|
|
|
|
var mainPaths = ['.'].concat(Module._paths); |
|
|
|
mainPaths = mainPaths.concat(Module._nodeModulePaths('.')); |
|
|
|
mainPaths = Module._nodeModulePaths('.').concat(mainPaths); |
|
|
|
return [request, mainPaths]; |
|
|
|
} |
|
|
|
|
|
|
|