VueFire on nuxt3 does not use runtime environment variables #1363
-
ReproductionRun vuefire with an at runtime api key does not work Steps to reproduce the bug
Expected behaviorI expect vuefire to use the NUXT_PUBLIC_VUEFIRE_API_KEY environment variable at runtime. Actual behaviorThe apps shows an empty screen. Which is the exact same behaviour as running the app without api key. Which suggests that the key can't be found at runtime. Additional informationNo response |
Beta Was this translation helpful? Give feedback.
Answered by
posva
Aug 17, 2023
Replies: 1 comment 10 replies
-
Have you check in that same file the env variables are present? You don’t need to hide those keys btw, they are put on the client code |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I never saw this, sorry! You need to define them at build time as some of these are inline in the client bundle. I think the best way is to have multiple
.env
files like suggested in Nuxt docs