electron中无法使用remote

主进程mainjs中webPreferences: {
nodeIntegration: true, // 集成node环境,让渲染进程可以使用node模块
contextIsolation: false, //保护原型污染
enableRemoteModule: true, // 使用remote模块S
}
都使用了还是不行,听别人说是禁止使用了,如果是这样的话那还有其他办法吗

问题已经解决,可以看我的这篇文章:https://blog.csdn.net/gfhj778/article/details/120095424

javascript - Electron require() is not defined - Stack Overflow I'm creating an Electron app for my own purpose. My problem is when I'm using node functions inside my HTML page it throws an error of: 'require()' is not defined. Is there any way to use Node https://stackoverflow.com/questions/44391448/electron-require-is-not-defined
实在不行的话可以回退版本,低版本默认是开启的