mirror of
https://github.com/electron/electron.git
synced 2026-01-10 16:08:06 -05:00
* chore: remove Node.js patch on Module.globalPaths * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
14 lines
349 B
JavaScript
14 lines
349 B
JavaScript
const Module = require('module');
|
|
|
|
module.exports = (paths) => {
|
|
const nodeModulePaths = Module._nodeModulePaths;
|
|
Module.ignoreGlobalPathsHack = false;
|
|
Module._nodeModulePaths = (from) => {
|
|
if (Module.ignoreGlobalPathsHack) {
|
|
return nodeModulePaths(from);
|
|
} else {
|
|
return nodeModulePaths(from).concat(paths);
|
|
}
|
|
};
|
|
};
|