Electronic Remote Global Value undefined

I am using var remote = require('electron').remote; and trying to get the value using remote.getGlobal('config').siteUrl

In my main.js, I set the value using global .

global.config = {siteUrl:"https://localhost:8088"};

on the html side (rendering side) I get the value as undefined when creating darwin .app on mac.

On the other hand, when I launch the application using npm start , it works fine.

+6
source share

Source: https://habr.com/ru/post/1013906/


All Articles