Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Commit

Permalink
Make Module.globalPaths a reference.
Browse files Browse the repository at this point in the history
We need to hack the search paths of the require function so we can
load libraries from embedded applications without modifications of
node's module code.

(cherry picked from commit 76ba048)
  • Loading branch information
zcbenz authored and codebytere committed Sep 13, 2018
1 parent 82e10b6 commit c9df7be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/modules/cjs/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ Module._initPaths = function() {
modulePaths = paths;

// clone as a shallow copy, for introspection.
Module.globalPaths = modulePaths.slice(0);
Module.globalPaths = modulePaths;
};

Module._preloadModules = function(requests) {
Expand Down

0 comments on commit c9df7be

Please sign in to comment.