Hi, I’m new to electron and webpack and I’m trying to allow using
require('electron') in my
angular2 app, because I need to have access to defined globals.
I’ve found somewhere, I need to add
target: 'electron' to use
require('electron') in app, but when I set this property in
webpack.config, app doesnt’s start and I can see an error
exports is not defined (in first line of bundled js file).
Am I missing something? Is it necessary to use
target: "electron" in webpack config if I want to load electron dependencies in app with
require or is there any other way?