[Vuejs]-.env file works for existing keys, but new ones I add are undefined

1👍

This is a DevSecOps feature provided by vue.js. This ensures that you do not expose any sensitive environment variables accidentally to the front-end or client.

Any variables you want to be accessible client side must start with VUE_APP_. You can still use keys without VUE_APP_, however, they will be available only to node.js environment on server side (if you have any code running there).

Leave a comment