自定义yarn运行vue项目命令
在项目中的package.json文件的scripts块中可以看到新项目的yarn命令集合
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
- 1
- 2
- 3
- 4
- 5
serve 就是vue项目的启动命令,可以通过修改serve自定义启动命令,如
"scripts": {
"start": "vue-cli-service serve",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
- 1
- 2
- 3
- 4
- 5
- 6
然后通过yarn start命令即可以运行项目。