电子远程全球价值undefined
我使用var remote = require('electron').remote;
并尝试使用remote.getGlobal('config').siteUrl
获取值
在我的main.js中,我使用global
设置值。
global.config = {siteUrl:"https://localhost:8088"};
在html端(渲染器端)我在mac上创builddarwin .app
时获取的值为undefined
。
另一方面,当我运行应用程序使用npm start
它工作正常。