John
John

Reputation: 533

Vue cli env without prefix VUE_APP

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

Upvotes: 3

Views: 1619

Answers (1)

Michal Levý
Michal Levý

Reputation: 37793

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

Upvotes: 1

Related Questions