-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V3.3.0 live reload broken when set hostname to 0.0.0.0:xxxx
#1777
Comments
@njugray Please create minimum reproducible test repo |
|
Thanks! |
/cc @hiroppy can you investigate? Don't have time on this right now 😞 |
This one also affects us because we run the dev server on a different port than our node server that is serving the page. It would be huge for us if the sockjs host was configurable/override-able, as it would let us do things like run the webpack-dev-server on a different host or in a container separate from our node server. |
Maybe |
Yeah, I took a look and if we could set the sockHost and sockPort, that would work for us. Unfortunately with just sockpath, it doesn't give us enough control over the domain. Another alternative would be to utilize the publicPath, publicHost and publicPort that are already part of the config, but either would unblock us from upgrading. Also, we should probably document the sockHost, sockPort and sockPath as I was only able to reason about them by stepping through the code. |
sockPort PR #1792, yep we will documented this in near future |
I did see the PR and it looks like it would resolve my issue. Is there a reason why this is different from the public host and Port? Afaik there wouldn't be a scenario when those would be different. |
I think it is bug, and should be by default with public host and public port, previously main commiter don't add tests on many features and now we have many weird code and sometimes break something, now we increase tests and in future this problem will be less, sorry |
Any way PR welcome |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@ryank311 sockHost and sockPort would be different from host and port in the case mentioned here where the Dev Server is behind a proxy. The inferring of the port from |
@zhangyuang yes that will fix the immediate issue here. 2 other things that probably need to be done:
|
|
Can you send a PR?
Already done |
ok |
already finish,now if you add sockPort, it will be never use location.port |
@zhangyuang please revert this, and let's do this in other PR, it is male dirty history and dirty changelog |
@evilebottnawi Yeah, could you revert only |
@hiroppy yep, some busy in this week, feel free to do this |
It seems this has been fixed in 58d1682#diff-bd664d218d585ff7bd6ceced46bd877aL229, now we're just waiting for a new release. |
@evilebottnawi Where is |
@Loonride hm no docs? |
@evilebottnawi Yes but also |
Yes, it is bug, but it is options only for CLI, you can use this in webpack.config.js |
@evilebottnawi I'm also not understanding how Assuming that
or
with no method to override the hostname or infer from other config options. I'm not familiar with the inner workings of this project so it's possible I'm looking in the wrong place, or that the sockHost value could be coming in via |
Oh, yes we don't have sockHost now, i mean |
This reverts commit beaa1f5. Until webpack/webpack-dev-server#1777 is fixed.
@hiroppy In what version this hotfix will be available? 👍 |
@pedrofurtado This fix will be fixed in the next version and the next version will be released in this week. |
@hiroppy Thanks for feedback! 🤝 |
hi @hiroppy - thanks for all the awesome work in maintaining this. any chance that a fix (new release) will be available this week, please? |
Yes, release will be on this week |
[Vue.js] FYI |
Operating System: MacOS
Node Version: v10.15.0
NPM Version: 6.4.`
webpack Version: 4.29.6
webpack-dev-server Version: 3.3.0
This is a bug
This is a modification request
Code
webpack-dev-server/client-src/default/index.js
Line 210 in 99e8db0
When start a node server like 0.0.0.0:8080, and load resources from
0.0.0.0:9000
, Port was reset toself.location.port
, which actually is 8080.For Bugs; How can we reproduce the behavior?
Expected Behavior
Live reload should listen 0.0.0.0:9000
Actual Behavior
Live reload listen 0.0.0.0:8080
The text was updated successfully, but these errors were encountered: