-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.questionIssues that look for answers.Issues that look for answers.
Description
I'd like to submit a PR that resolves the root project's package name so that you can use absolute require paths. However, I'm finding it very hard to figured out how this bit of code works:
https://github.com/nodejs/node/blob/7b73f559029a10474b74a83bfb1117ab512785d4/lib/module.js
Seems like it should be a one-liner somewhere. I just need to add the base project as one of the "paths" to search. Any ideas where that might be?
I'm thinking its in here.
Line 304 in 7b73f55
Module._resolveLookupPaths = function(request, parent) { |
Something like paths.push(path.dirname(parent.id))
.
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.questionIssues that look for answers.Issues that look for answers.