Commit 492fc0d7 authored by isaacs's avatar isaacs Committed by Ryan Dahl
Browse files

Split out modulePaths and defaultPaths

This way, the "default" paths of ~/.node_libraries and {prefix}/lib/node are only checked *after* anything that the user has placed into the NODE_PATHS environ, or pushed onto require.paths.

This makes require.paths a much more effective write-target, albeit slightly less useful as a read-target.  However, given the existence of require.resolve(), this is less of an issue -- if you want to know what a module ID will map to, just ask that question and get an authoritative answer from the loading machinery.
parent b0aadbea
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment