DEV Community

loading...

Discussion on: Building a 3D application with Electron and BabylonJS using TypeScript

Collapse
jodo profile image
Johannes Dobler

There was a breaking change in electron. the "nodeIntegration" flag is now default to false. You need to set it to true as it inserts "require" into the DOM. So add this to your BrowserWindow:

mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true
}
});

Collapse
toohaan profile image
toohaan

thx Johannes,

it works like a charm.