Nuxt. Using .env variables in appConfig.ts file

34 Views Asked by At

I am tring to use .env variable in my Nuxt app's app config file, is it real?

I am doing something like this screenshot of code example, and using my variable like enter image description here, i am doing this, cause where i have some ui layer that need dynamic changed variable depending on it's runing mode. My problem is on app builiding or loading i can get my variable but after, my variable becomes undefined

1

There are 1 best solutions below

1
yermakhan On

U can't get .env variable in app config if component that uses variable is client only