结果报错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
1、原创文章,作者:诺米,如若转载,请注明出处:https://www.http3w.com/archives/495
2、本站内容若有雷同从属巧合,若侵犯了您的权益,请联系本站删除,E-mail: wtao219@qq.com