package.jsonelectron-forgeelectron-notarize

Where can I find electron forge config js file where package.json is parsed?


I'm looking to use environment variables to store my apple user credentials, but the issue is with Electron Forge this is added to the package.json file which doesn't accept those variables. I'm looking for the .js file that parses the package.json file so I can replace the values with process.env variables.

I found the osxNotarize JS file but it takes the arguments from another module and while I THINK I could just insert them there, I don't want to break any of the logic that comes before or after that. I'd rather just get to the earliest point that the .json file is parsed and insert my variables there.

Any help is much appreciated!


Solution

  • It would be crazy to modify the Electron forge source, you should rather extract the electron forge configuration in a separate JS file : ElectronForge configuration and load your environment variables using process.env.YOUR_VARIABLE_NAME

    enter image description here