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 nitsakh committed Mar 1, 2019
1 parent 8a273f1 commit 038d4e2
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 @@ -915,7 +915,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 038d4e2

Please sign in to comment.