2

I am stuck in vue.js, how to manage multiple env for multiple servers like local, development and production ?

1

1 Answer 1

4

you can create different .env file for different environment like .env.development, .env.staging, and .env.production and in your package.json create build script like this -

"scripts": {
"build-dev": "vue-cli-service build --mode development --modern",
"build-stage": "vue-cli-service build --mode staging --modern",
"build-prod": "vue-cli-service build --mode production --modern",
}

For details please follow this doc https://cli.vuejs.org/guide/mode-and-env.html

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.