From: Ryohei Ikegami Date: Mon, 3 Apr 2017 13:11:29 +0000 (+0900) Subject: Do not add search paths in devtools X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=001d03c859be5e68267c6b59d3a73d7f2fe7a9fd;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Do not add search paths in devtools --- diff --git a/lib/renderer/init.js b/lib/renderer/init.js index c6fd6a2..72f7c9e 100644 --- a/lib/renderer/init.js +++ b/lib/renderer/init.js @@ -117,8 +117,11 @@ if (nodeIntegration === 'true') { global.__filename = __filename global.__dirname = __dirname - // Search for module under the app directory - module.paths = module.paths.concat(Module._nodeModulePaths(electron.remote.app.getAppPath())) + 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.