Can you use dotenv in electron production?

Viewed 132

I'm building an Electron, React app where I'm in need of a dotenv file. In code, I call my variables with process.env.variable which works fine in development.

However, once distributed with electron-builder, the dotenv variables no longer work (undefined).

My question is now, is it even possible to do this and if yes, how? I tried to find a solution in the internet but it seems like people don't really face this issue.

0 Answers
Related