Vue 打包时一般build命令找不到的原因

时间:2021-04-30 21:05:00   收藏:0   阅读:159

结果报错npm ERR! missing script: build,后来发现package.json中scripts参数为

"scripts": {
"dev": "vue-cli-service serve",

"build:prod": "vue-cli-service build",

"build:stage": "vue-cli-service build --mode staging",

"preview": "node build/index.js --preview",

"lint": "eslint --ext .js,.vue src",

"test:unit": "jest --clearCache && vue-cli-service test:unit",

"test:ci": "npm run lint && npm run test:unit",

"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"

},

 

 

 

所以正确的命令应该为

npm run build:prod --report

 



原文:https://www.cnblogs.com/coderwhytop/p/14723107.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!