#How do I access system environment variables that I cannot prepend with VITE_?

1 messages · Page 1 of 1 (latest)

undone flame
#

Here is the context: I am using nhost and need to use the NHOST_ADMIN_SECRET, which is a Nhost System Environmental variable and I cannot prepend the variable name so Vite will recognize it.

Has anyone else experienced a similar situation or ideas for a solution?

warped hedge
#

I think unfortunately you may need to duplicate it with key starting with VITE_

marble wyvern
#

Or kep it the value of your env var: VITE_NHOST_ADMIN_SECRET=$NHOST_ADMIN_SECRET