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 deepak1556 committed Dec 10, 2018
1 parent fffd852 commit 5d40139
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 @@ -820,7 +820,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 5d40139

Please sign in to comment.