I am stuck in vue.js, how to manage multiple env for multiple servers like local, development and production ?
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