Hello,
We’re attempting to read environment variables from our React UIKIT application but when doing console.log(process.env.MY_KEY)
always end up with a process is not defined
.
Is there any way to read these from UIKIT Frontend ? On the backend it works fine.
Hey @GuillaumeBero,
Apologies, the documentation isn’t clear on this however the environment variables aren’t accessible from the frontend of your app which is running in the browser.
You will need to build a resolver function and call it from the apps frontend to access the variable.
I hope this clarifies! let me know if you have any questions about how to do this.
If this has answered your question, please mark as Solved.
Thanks!
Mel