I am looking for help on how to access process.env
to gain access to an environment variable value set up in .env, on the client side. I know that Frontity, for some reason, fills up the state with those values and leaves the process.env
empty, but this means that environment values can only be accessed in components and then passed down. I need to access those variables globally, ie. outside of a component. I don’t like to pass down values through four functions, when I should be able to just pass process.env.API_URL
to a constructor.
How can I go about this?