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.
  • Loading branch information
zcbenz authored and kevinsawicki committed Jul 31, 2017
1 parent 68bd6ce commit f4ad6b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,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 f4ad6b7

Please sign in to comment.