I am deploying nuxt app on vercel. I added a secret to vercel environment following this guide - https://vercel.com/docs/environment-variables#secret-environment-variables
Locally I am using dotenv and it is working well, loading the variable from .env file into process.env.Token
but process.env.Token
is null when deployed on vercel.
How to solve this?
It's work for me in Nuxtjs, just set your name of environment variable starting with NUXT_ENV_
For example
process.env.NUXT_ENV_Token
Vercel will be automatically injected into the process environment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With