Error reported by electron: referenceerror: require is not defined
This error is suddenly reported. Many people on the Internet say that nodeintegration: true should be set, but it doesn’t work.
until I see a comment on stackoverflow:
all you need to do is add contextisolation: false after nodeintegration: true in the webpreferences object,
try it and it’s OK, This means adding contextisolation: false after nodeintegration: true