package.json脚本命令为
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
},
将输出目录参数传递给build命令
npm run build -- --dest='../dist'
参考:https://cli.vuejs.org/zh/guide/cli-service.html#vue-cli-service-build
package.json脚本命令为
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
},
将输出目录参数传递给build命令
npm run build -- --dest='../dist'
参考:https://cli.vuejs.org/zh/guide/cli-service.html#vue-cli-service-build
vue cli 4打包,命令行指定打包后的输出目录,无需修改配置文件
https://xxlab.tech/archives/vuecli4-da-bao--ming-ling-xing-zhi-ding-da-bao-hou-de-shu-chu-mu-lu--wu-xu-xiu-gai-pei-zhi-wen-jian