Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Public path is hard-coded as localhost #64

Open
fweep opened this issue Oct 27, 2016 · 0 comments
Open

Public path is hard-coded as localhost #64

fweep opened this issue Oct 27, 2016 · 0 comments

Comments

@fweep
Copy link

fweep commented Oct 27, 2016

This isn't necessarily a bug, but it's potentially confusing. When you start the server with the default config/webpack.config.js, it prints:

 webpack result is served from //localhost:3808/webpack/

While this is true in the default case, if you start it with a custom host binding, like this:

webpack-dev-server --config config/webpack.config.js --host 10.0.0.100

Then the hard-coded localhost is a bit misleading. Since webpack-dev-server already prints the host and port binding on the line immediately prior, it might make sense to just limit the publicPath setting to the actual file path (/webpack). For example:

 http://10.0.0.100:3808/webpack-dev-server/
webpack result is served from /webpack/

In reading the webpack-dev-server documentation, it looks like publicPath is supposed to be relative, but I'm still learning, so I'm not sure, but it works for me with just the relative path setting.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant