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

真诚赞赏,手留余香
赞赏
随机推荐
nginx location 配置返回文本
sql 之 union && union all 以及安全问题
macOS 自动登录 ssh
实现图片懒加载的两种方法
织梦分页样式
ThinkPHP v3.1.2版本独立分组功能的解决思路
Cheerio 中文文档
PHP OpenSSL扩展 - 对称加密
macOS Mojave上升级PHP
CentOS 7 安装 Google BBR