The renderer process still throws an error
Uncaught ReferenceError: require is not defined
    at <anonymous>:1:1
even though the main process' webPreferences.nodeIntegration was already set to true like so:
function launchMainWindow () {
  const mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      nodeIntegration: true
    }
  })
  mainWindow.loadFile('main.html')
}
This is contradictory to an answer from a similar question. Did I miss something?
What makes the require() method on the renderer process to be undefined?
 
    