Electron JS - Cannot destructure property ‘BrowserWindow‘ of ‘require(...).remote‘ as it is undefine
今天在Electron开发学习中遇到这个问题,查网上的资料都说需要在主进程窗口中设置enableRemoteModule: true,这种说法不完全正确,在Electron10之前可以解决,在10之后不行。根据官方文档要求,今天写一下Electron10之后remote的正确使用方法。win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true,
原创
2021-09-08 10:55:27 ·
2523 阅读 ·
3 评论