From a4f94b89b4791ff42df88d4a869f0ee47b2255dc Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 23 May 2016 15:15:39 -0700 Subject: [PATCH] Add comment about Module path --- lib/common/reset-search-paths.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/common/reset-search-paths.js b/lib/common/reset-search-paths.js index 72449559b224..4d09f6c89ca6 100644 --- a/lib/common/reset-search-paths.js +++ b/lib/common/reset-search-paths.js @@ -36,6 +36,8 @@ Module._nodeModulePaths = function (from) { return paths } +// Patch Module._resolveFilename to always require the Electron API when +// require('electron') is done. const electronPath = path.join(__dirname, '..', process.type, 'api', 'exports', 'electron.js') const originalResolveFilename = Module._resolveFilename Module._resolveFilename = function (request, parent, isMain) {