10

Webpack Dev Server defaults to using localhost as its host. This can easily be overwritten by specifying the host parameter with either a hostname or IP address. However, it seems that you can only specify one. For example, if I specify the IP Address 192.168.1.20, then it stops responding to localhost. How can I configure Webpack Dev Server to listen to multiple hosts?

2
  • You were able to find it? Commented Mar 2, 2016 at 20:43
  • @phkavitha: I started a discussion here: github.com/webpack/webpack-dev-server/issues/400. If you can chime in with your feedback, that will be really helpful. Commented Mar 9, 2016 at 2:53

1 Answer 1

10

0.0.0.0 is the catch-all host and will bind to all hosts.

Example:

  devServer: {
    port: 3000,
    host: '0.0.0.0'
  }

Source: https://github.com/webpack/webpack-dev-server/issues/400#issuecomment-201213206

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.