diff --git a/lib/renderer/init.js b/lib/renderer/init.js index 38441c9ec143..c6fd6a2e24c5 100644 --- a/lib/renderer/init.js +++ b/lib/renderer/init.js @@ -116,6 +116,9 @@ if (nodeIntegration === 'true') { } else { global.__filename = __filename global.__dirname = __dirname + + // Search for module under the app directory + module.paths = module.paths.concat(Module._nodeModulePaths(electron.remote.app.getAppPath())) } // Redirect window.onerror to uncaughtException.