当我尝试在Electron中启用Node的集成时,我得到了这个错误:

如果我删除Node集成,它将再次工作。
function createWindow () {
// Create the browser window.
const mainWindow = new BrowserWindow({
width: 1500,
height: 800,
autoHideMenuBar: true,
webPreferences: {
nodeIntegration: true,
preload: path.join(__dirname, 'preload.js')
}
})发布于 2020-02-12 21:16:59
内容安全策略存在问题。您可以尝试使用正在使用的外部样式(如Bootstrap、FontAwesome等)来设置style-src策略。
https://stackoverflow.com/questions/60189118
复制相似问题