You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
上午更新了下vue-cli,然后生成了一个移动端项目,然后我用平常的ip地址替换localhost打开项目。发现打开不了,然后我就跑了一遍之前的项目,发现可以打开。就很纳闷,各种检查,最后确定是配置问题,然后一行行的对比老项目,最后发现dev-server.js 内的一行代码 var server = app.listen(port, 'localhost')
凶手终于找到了,查了文档发现localhost这个参数是限定服务host为localhost,参数不加,则可以以127.0.0.1、localhsot、本地ip地址打开。