📌  相关文章
📜  为什么它说 require 没有定义 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:01:08.887000             🧑  作者: Mango

代码示例1
// In the Main.js file in electron
app.on('ready', () => {
    mainWindow = new BrowserWindow({
      // Add these lines of code and it should start working
        webPreferences: {
            nodeIntegration: true,
            contextIsolation: false,
        }
    });
});