I had initially been using electron stable (4.x.x), and was able to use require in both my browser and renderer processes. I upgraded to electron beta (5.0.0) b
require
Like junvar said, nodeIntegration is now false by default in 5.0.0.
nodeIntegration
The electronjs FAQ has some sample code on how to set this value.
let win = new BrowserWindow({ webPreferences: { nodeIntegration: true } }) win.show()