I have .env file in the root of my project in Vue3. In the components folder, I have Card.vue and this code
console.log(process.env.FOO)
But in browser, it shows undefined.
Variables must start with VUE_APP, hence
`VUE_APP_FOO`
VUE_APP_FOO in .env file, and then refer to it.Having a similar problem here. I'm usnig VUE_APP_FOO to set the variable in .env but it's still undefined when console.log(process.env.VUE_APP_FOO).
Using Vue2 (Vue cli 4.5.11)
console.log(process.env) for debugging