devtron icon indicating copy to clipboard operation
devtron copied to clipboard

How to install devtron in electron 12 or higher with preload js and webpack

Open raviSussol opened this issue 3 years ago • 3 comments

I have an app having preload js used with bundling via webpack. I've added Devtron as an dependency package in the app. I've also added the line window.__devtron = {require, process}; in the preload.js file as guided in here. When I try to install by running require('devtron').install(); in the console tab of the electron devtools window then it throws an error Uncaught ReferenceError: require is not defined. I have even tried with window.require('devtron').install(); still throws the same error. Am i missing something?

raviSussol avatar Apr 10 '21 02:04 raviSussol

We have exactly the same issue. Did you manage to resolve it?

dev-manager-uk avatar May 11 '21 16:05 dev-manager-uk

Add your main js file of electron here. may be you forgot to use node-integration

sharunspi avatar May 12 '21 08:05 sharunspi