Bootstrap

【解决方案】webpack-devServer 无法通过ip访问

方案一:

var server = new WebpackDevServer(webpack(webpackConfig), {
    ...
  });
  server.listen(port, "0.0.0.0", function(err) { ...

方案二:

var server = new WebpackDevServer(webpack(webpackConfig), {
  host: '0.0.0.0',
  ...
}
  });
  server.listen(port, function(err) { ...

方案三:

使用useLocalIp


var server = new WebpackDevServer(webpack(webpackConfig), {
  useLocalIp: true,
  //host: '0.0.0.0',
  ...
}
  });
  server.listen(port, function(err) { ...
;