Closed

Description
Version
3.0.0-beta.16
Reproduction link
https://codesandbox.io/s/qlx254n09j
Steps to reproduce
- Create
.env.staging
file in the root - Add key pairs
NODE_ENV=production
andVUE_APP_ENV=staging
in the file - Add script to package.json
"staging":"vue-cli-service build --mode staging",
- Run
npm run build --mode staging
- Run
npm run staging
What is expected?
Case 1
npm run buid --mode staging
gives a production oriented build with staging variables
Case 2
npm run staging
gives a production oriented build with staging variables
What is actually happening?
Case 1
It gives a production oriented build with production variables
Case 2
It gives a development oriented build with staging variables
I need this to deploy this to Heroku. CD/CI. I'm using postinstall
script to build production
, dev
or staging
servers based on the APP_VUE_ENV
variable. Please help me. I'm super excited with Vue so far!
Reference:
https://cli.vuejs.org/guide/mode-and-env.html#example-staging-mode
#948
https://forum.vuejs.org/t/how-to-build-production-app-with-varying-config/29708
Metadata
Metadata
Assignees
Labels
No labels