Add comment about Module path

This commit is contained in:
Kevin Sawicki 2016-05-23 15:15:39 -07:00
parent 5e2f36387f
commit a4f94b89b4

View file

@ -36,6 +36,8 @@ Module._nodeModulePaths = function (from) {
return paths 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 electronPath = path.join(__dirname, '..', process.type, 'api', 'exports', 'electron.js')
const originalResolveFilename = Module._resolveFilename const originalResolveFilename = Module._resolveFilename
Module._resolveFilename = function (request, parent, isMain) { Module._resolveFilename = function (request, parent, isMain) {