Some hours I tried to configure what was happening, after diving in documentations and some research I found that:
In addition to these Project Environment Variables defined in .env.* files, you could also define OS Env Vars. OS Env Vars which are prefixed with GATSBY_ will become available in browser JavaScript.
So my question is why is it necessary to prefix with GATSBY_ and my suggestion is about ability to configure if someone wants to use vars in client side without specific prefix.
I think React documentation has a great explanation for this practice.
Note: You must create custom environment variables beginning with REACT_APP_. Any other variables except NODE_ENV will be ignored to avoid accidentally exposing a private key on the machine that could have the same name.
I think React documentation has a great explanation for this practice.
Note: You must create custom environment variables beginning with REACT_APP_. Any other variables except NODE_ENV will be ignored to avoid accidentally exposing a private key on the machine that could have the same name.
Great, I didn't know it, that's good answer for my question.