Skip to content
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

How to set path to other server (just like http://localhost:3000/__webpack_hmr) #37

Closed
chentsulin opened this issue Oct 15, 2015 · 4 comments

Comments

@chentsulin
Copy link

In my electron project https://github.com/chentsulin/electron-react-boilerplate/tree/react-transform, I should request to http://localhost:3000/__webpack_hmr, but It will automatic polling to file:///__webpack_hmr.

GET file:///__webpack_hmr net::ERR_FILE_NOT_FOUND

I only see path can be set as options, but path=http://localhost:3000/__webpack_hmr not works. Is there any other options can get this done?

@glenjamin
Copy link
Collaborator

You should be able to set the full path in https://github.com/chentsulin/electron-react-boilerplate/blob/react-transform/webpack.config.development.js#L16

This has worked for others in the past, so if you're still having issues it must be electron related - I would recommend trying to create an EventSource connection manually in the console to test.

@chentsulin
Copy link
Author

'webpack-hot-middleware/client?path=http://localhost:3000/__webpack_hmr' <- this one works now. Not sure why doesn't works previously...Thanks your instant reply! : )

@tahmidsadik
Copy link

By using this line 'webpack-hot-middleware/client?path=http://localhost:3000/__webpack_hmr' I got the message [hmr] connected. But after I made some change in the code, [hmr] is not requesting to localhost to retrieve the hot-update.json and then it shows cannot find update (full reload needed) warning. How can I make react-hot-middleware to look for hot-updates in localhost ?

@vincentfretin
Copy link

@tahmidsadik112 Do you have defined publicPath? See my example
gaearon/react-transform-boilerplate#47 (comment)

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

No branches or pull requests

4 participants