-
Notifications
You must be signed in to change notification settings - Fork 296
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
The client cannot connect to the /__webpack_hmr
endpoint
#16
Comments
What version of express are you using? There's been a few issues with the eventsource polyfill - i'm going to revert those changes and unpublish |
|
@glenjamin don't you want to keep it working with non Express servers? E.g. when you need to launch a dev server by using BrowserSync (which uses Connect under the hood). |
Thanks! |
Without webpack running in my project, I consistently see requests to __webpack_hmr:
When running my express server on a different port than what was used for my project using webpack, I can avoid these requests. They don't actually affect my project, but are extremely annoying. Is webpack_hmr running in the background? Is there a way to prevent this? |
If you have the client in your bundle, it will continuously attempt to connect to the server. If you want to remove the client, you need to leave it out of the client bundle. |
@glenjamin I know this is a little old but I am having the same problem @hoodsy is asking about. my my backend API are not bundle with client but stilling seeing the request to _webpack_hmr. You you help me understand what you mean by "If you want to remove the client, you need to leave it out of the client bundle." Thanks |
@travisbmiller in your webpack config there's a line which adds the hot-middleware client to the bundle. If you leave this out, it won't attempt to connect to the server |
@glenjamin Thanks for the response. I removed it -- update -- it was a cache problem. removing `'webpack-hot-middleware/client' fixed problem. Thanks! |
@glenjamin Thanks for the direction. Removing 'webpack-hot-middleware/client' from 'entry' section fixed this. Just wanted to understand, why this setting was suggested in the 'entry' section of react hot boilerplate? |
@jsrraman If you add that into the config, it will connect to the server and perform the function this middleware is supposed to do. If you take it out, it won't do anything. In the comments above people appeared to have disabled or moved the server component, but had left the client in. |
Hi glenjamin, Could you please help me to resolve this problem ? |
@wassubaba Late to the party, but in case others stumble upon this, it looks like you forgot a slash after your hostname. The correct HMR URL should be All in all, it would be great to be able to change the |
No error messages. How to debug this issue?
The text was updated successfully, but these errors were encountered: