Closed
Description
What problem does this feature solve?
Increases comprehension on what the --mode feature can be used for and how it might be used, specifically that you can override the NODE_ENV variable to produce a production build with alternate config (ie. staging)
Refer to https://forum.vuejs.org/t/how-to-build-production-app-with-varying-config/29708/3
What does the proposed API look like?
.env
VUE_APP_TITLE=My App
.env.staging
NODE_ENV=production
VUE_APP_TITLE=My App (staging)
vue-cli-service build
- builds a production app using .env then .env.production (or .env.production.local)
vue-cli-service build --mode staging
- builds a production app using .env then .env.staging (or .env.staging.local)
In both cases, the app is built as a production app because of the NODE_ENV, but in the staging equivalent the process.env.VUE_APP_TITLE variable is overrided