Accessing PM2 environment variables inside nuxt.config.ts ?
Hi all, I have a PM2 ecosystem file that's defining an APP_ENV=production/staging/development variable.
But when I try to use process.env.APP_ENV==='production' inside nuxt.config.ts the result seems to always be false, even though running "pm2 env N" shows the enviromnent variable is set.
Any suggestions or something obvious I'm missing?
1 Reply
Also linking https://www.youtube.com/watch?v=_FYV5WfiWvs here (already answered in #ð¬ã»discussion )
Alexander Lichter
YouTube
Nuxt's runtimeConfig - The most common mistake
ð€¯ Throughout my projects, consultancies and code reviews I came across lots of interesting findings - also with regards to Nuxt's runtimeConfig feature. Repeatedly I noticed ONE big mistake though which you might do at this very moment in your project. In this video, explain what it is, why you shouldn't do it and how to use runtimeConfig correc...