Vue cli env without prefix VUE_APP

Viewed 833

is possible to use env in vue cli without de prefix VUE_APP,

Example in .env without prefix VUE_APP:

API_MESSAGE_URL = localhost:5000/v1
1 Answers

You can name your ENV variables however you like but...

Note that only NODE_ENV, BASE_URL, and variables that start with VUE_APP_ will be statically embedded into the client bundle with webpack.DefinePlugin. It is to avoid accidentally exposing a private key on the machine that could have the same name

Vue CLI docs

Related