Skip to content
Permalink
Browse files

doc: fix an error in resolution algorithm steps

As it is, if `X begins with './' or '/' or '../'` (step 3), it reads
as if it were possible for the algorithm to do a node_modules lookup
(step 4). But that doesn't seem to reflect the actual logic.

PR-URL: #29940
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
alexzherdev authored and targos committed Oct 11, 2019
1 parent 66c6818 commit d0f5bc1aa74466174746f7e23e672f24b3810b18
Showing with 1 addition and 0 deletions.
  1. +1 −0 doc/api/modules.md
@@ -159,6 +159,7 @@ require(X) from module at path Y
3. If X begins with './' or '/' or '../'
a. LOAD_AS_FILE(Y + X)
b. LOAD_AS_DIRECTORY(Y + X)
c. THROW "not found"
4. LOAD_NODE_MODULES(X, dirname(Y))
5. THROW "not found"

0 comments on commit d0f5bc1

Please sign in to comment.
You can’t perform that action at this time.