多个开发环境配置,测试版、生产版本等,具体看项目
cnpm install --save-dev cross-env
outputDir: process.env.NODE_ENV === 'demo' ? "dist-demo" : process.env.NODE_ENV === 'production' ? "dist-dev" : "dist",
"scripts": {
"start": "vue-cli-service serve",
"serve": "vue-cli-service serve",
"build-dev": "cross-env NODE_ENV=production vue-cli-service build",
"build-demo": "cross-env NODE_ENV=demo vue-cli-service build"
},