The fix:
- Install
webpack-target-electron-renderer
module, or - Use Webpack
externals
definitions:
{
externals: {
'electron': 'require("electron")',
'net': 'require("net")',
'remote': 'require("remote")',
'shell': 'require("shell")',
'app': 'require("app")',
'ipc': 'require("ipc")',
'fs': 'require("fs")',
'buffer': 'require("buffer")',
'system': '{}',
'file': '{}'
}
}
Install of installing
webpack-target-electron-renderer
you can upgrade webpack: https://github.com/chentsulin/webpack-target-electron-renderer#migrate-to-webpack-2-or-webpack-1--11215