3

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 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.