webpack-dev-server 无法通过ip访问

webpack-dev-server --port 3000 --hot

would allow the server to be accessed at:

 

http://localhost:3000 and

http://10.0.1.4:3000 (my local IP).

 

In 1.8.0 accessing http://10.0.1.4:3000 no longer works.

 

Not sure if this has to do with webpack-dev-server or one of the dependencies.

 

I'm using node 0.12.2 and running OSX 10.10.2


 

1.8.0 appears to be defaulting to "localhost' now. You can open it up by passing the --host option.

webpack-dev-server --port 3000 --hot --host 0.0.0.0



from:  https://github.com/webpack/webpack-dev-server/issues/147

 

修改时间 2018-05-15

真诚赞赏,手留余香
赞赏
随机推荐
Cheerio 中文文档
Photoshop 线稿上色技巧笔记
filezilla server FTP 安装报错 "could not load TLS network. Aborting start of administration interface"
阿里专家:一文教会你如何写复杂业务代码
nginx 代理
CSS 伪类实现弧形
Ecshop二次开发之后台添加新栏目
禁止浏览器下拉刷新
包含汉字元素的PHP数组转成json字符串
20170118 数位板 进步