Do not add search paths in devtools
This commit is contained in:
parent
d1212d4a43
commit
001d03c859
1 changed files with 5 additions and 2 deletions
|
@ -117,9 +117,12 @@ if (nodeIntegration === 'true') {
|
|||
global.__filename = __filename
|
||||
global.__dirname = __dirname
|
||||
|
||||
if (window.location.protocol !== 'chrome-devtools:') {
|
||||
// Search for module under the app directory
|
||||
// (remote.app doesn't work in devtools)
|
||||
module.paths = module.paths.concat(Module._nodeModulePaths(electron.remote.app.getAppPath()))
|
||||
}
|
||||
}
|
||||
|
||||
// Redirect window.onerror to uncaughtException.
|
||||
window.onerror = function (message, filename, lineno, colno, error) {
|
||||
|
|
Loading…
Reference in a new issue