Electronレンダリングプロセスでnodeモジュールを使用する

299 ワード

const win = new BrowserWindow({
        width: 800,
        height: 600,
        webPreferences: {
            nodeIntegration: true
        }
    })

上記では、メインプロセスでnodeIntegration=trueを開きます.その後、nodeモジュールはレンダリングプロセスで使用できます.レンダリングプロセスでnodeモジュールを使用すると、プロジェクトにどのような影響がありますか?