其他分享
首页 > 其他分享> > 解决: Uncaught ReferenceError: process is not defined

解决: Uncaught ReferenceError: process is not defined

作者:互联网

 


Uncaught ReferenceError: process is not defined

发现许多博客只是添加了
nodeIntegration: true,
1
仍然会报这个问题


解决办法
# 再添加一行
contextIsolation: false
1
2
# 完整代码
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
preload: path.join(__dirname, 'preload.js'),
// nodeIntegration: true
nodeIntegration: true,
contextIsolation: false
}
})

原文链接:https://blog.csdn.net/qq_41685731/article/details/115176424

标签:preload,contextIsolation,process,defined,nodeIntegration,Uncaught,true,Reference
来源: https://www.cnblogs.com/onesea/p/15227739.html