Electron node integration enabled 设置
Electron调试Console报告如下内容时
Electron Deprecation Warning (nodeIntegration default change) This window has node integration enabled by default. In Electron 5.0.0, node integration will be disabled by default. To prepare for this change, set {nodeIntegration: true} in the webPreferences for this window, or ensure that this window does not rely on node integration and set {nodeIntegration: false}.
是提示可以为了版本前向兼容,可以控制是否集成node。方式是在Electron工程的main.js里,增加一段webPreferences:{nodeIntegration: true}的内容:
mainWindow = new BrowserWindow({width: 1400, height: 800, minWidth:1400, minHeight:800, transparent: false, frame: true, show: false, webPreferences:{nodeIntegration: true}})
这样提醒就消失了。
-End-