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

Cannot get hot reload running #52

Open
heygambo opened this issue Aug 26, 2016 · 5 comments
Open

Cannot get hot reload running #52

heygambo opened this issue Aug 26, 2016 · 5 comments

Comments

@heygambo
Copy link

Hey,

I've combined your generated webpack config with the one that vue.js generates.
Now I wonder how to get live reload running.

Webpack seems to inject some code that tries to load http://localhost:3808/__webpack_hmr
But that path resolves in Cannot GET /__webpack_hmr.

Is that even needed?

When I include http://localhost:3808/webpack-dev-server.js then the whole page reloads reloads completely. That's not my intent.

Thx in advance!

Best,
Christian

@neurodynamic
Copy link

+1

@mipearson
Copy link
Owner

I don't know, sorry :(

We haven't used hot reload in our own dev for a while as we found it unreliable. I might take it out of the example webpack config.

Keen for a solution, though, so leaving this open.

@sankalpk
Copy link

sankalpk commented Nov 5, 2016

I recently got it working with a setup like this. It's been working well so far:
https://gist.github.com/sankalpk/bbe7bf8a17a5638948e0d2b158f755fb

For those interested, here's a more full example with React and Relay:
https://gist.github.com/sankalpk/e0664f9ec2c222e2c8a1d708ee159e14

@sankalpk
Copy link

sankalpk commented Nov 5, 2016

If you like this approach, I'd be happy to submit a PR. Please let me know.

@jarongao
Copy link

jarongao commented Nov 27, 2016

I had trouble getting it working in my Docker setup and started looking into @sankalpk's solution.

I then realized I was on an older version of Node. I updated my Dockerfile to grab Node 7.2, and now hot reloading works for me with <script src="http://localhost:3808/webpack-dev-server.js"></script>.

For other Docker/Docker-compose users, I referenced the latest node image Dockerfile: https://github.com/nodejs/docker-node/blob/718102a587e7f02748402551b51407332384c1b3/7.2/Dockerfile

Update: This still reloads the whole page.

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

5 participants