vue修改启动的端口和host

打开vue项目(dev)

dev/config/ 路径修改index.js文件

 

然后对host和pord修改指定的即可

host: 'localhost', // can be overwritten by process.env.HOST
port: 8082, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-

  

posted @ 2019-08-18 03:11  t_zcx  阅读(10294)  评论(0编辑  收藏  举报