vue-cli4 启动项目时自动在浏览器中打开

方法一:

在 package.json 中添加 --open 

 

方法二:

在 vue.config.js 中,devServer 添加加 open:true ,没有vue.config.js,自己创建一个

module.exports = {
  devServer: {
    open: true
  }
}

 

posted @ 2021-06-03 14:56  smil、梵音  阅读(197)  评论(0编辑  收藏  举报