DEV Community

Discussion on: Integrating an Angular-CLI application with Electron - The IPC

Collapse
 
jessyco profile image
Jessy

Missing from this article is that, for window.require to work you also need to make sure your BrowserWindow you create has the option

...
webPreferences: {
  nodeIntegration: true,
}
Collapse
 
michaeljota profile image
Michael De Abreu

Thanks! Looks like one of the changes they introduced with Electron 4. electronjs.org/blog/electron-4-0