Where is process.type being set?


#1

Hi,

I am just investigating why I can’t get electron-log to work for me,
and I realized my global variable process.type is browser for the main process, and undefined in the renderer process.

I am using an old version of electron-builder (version 2.10.0), but I am not sure that it is the cause.

So I am wondering, where is process.type being set?


#2

You don’t have to declare process as a variable, it works in the renderer without doing that.


#3

You didn’t understand my question.
The process.type is not defined properly in my configuration. And i am trying to understand where and it is being initialized.


#4

Oops, I’m sorry :sweat_smile: . Can you elaborate what is happening exactly?


#5

I am using Cross-Builder,
and it uses an old version of electron-builder and electron-packager.

I was trying to use electron-log,
and when it didn’t work, I found out that
process.type is not initialized properly.

In the Main process process.type='browser’
and in the renderer process, process.type=undefined