Skip to content

module: replace default paths in require.resolve()

Rodrigo Muino Tomonari requested to merge github/fork/cjihrig/resolve into master

Prior to this commit, the default search paths would be included in the require.resolve() process, even if user specified paths were provided. This commit causes the default paths to be omitted by using a fake parent module.

Refs: https://github.com/nodejs/node/issues/5963#issuecomment-345269341

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

module

Merge request reports

Loading