Vue打包npmrunbuild时报错:npmERR!missingscript:buil。
。。
使⽤element-vue打包项⽬npm run build的时报错:npm ERR! missing script: build
在项⽬根⽬录下的package.json中发现问题所在:
"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/l",
"new": "plop"
查看svg
},
所以需要修改⼀下打包的命令,正确的命令为:
npm run build:prod --report

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。