vue-cli3启动服务自动打开浏览器配置
vue-cli3启动服务自动打开浏览器配置
1.找到package.json文件
2.找到配置项‘scripts’
3.找到配置项‘serve’
4.修改下,加个字段 “serve”: “vue-cli-service serve --open”
修改前
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
},
修改后
"private": true,
"scripts": {
"serve": "vue-cli-service serve --open",
"build": "vue-cli-service build"
},