Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Live Reload Not Working On Webpack Branch #764

Closed
jeremyjh opened this issue Jun 22, 2019 · 15 comments
Closed

Live Reload Not Working On Webpack Branch #764

jeremyjh opened this issue Jun 22, 2019 · 15 comments
Labels

Comments

@jeremyjh
Copy link

It works fine with Rollup, but on Webpack the page gets rebuilt on change but then you have to manually refresh the browser if you want to load the changes.

@Aias
Copy link

Aias commented Jun 30, 2019

Also seeing this, with the following error logged to the console:

Uncaught TypeError: Cannot read property 'status' of undefined
    at check (sapper-dev-client.js:6)
    at EventSource.source.onmessage (sapper-dev-client.js:37)

@jacobstanley
Copy link

jacobstanley commented Jul 17, 2019

I was also having this problem on webpack (when it worked just fine with rollup), but I eventually found that if I manually disabled hot module reloading then sapper will enable live reloading instead and everything seems to work as expected.

So I have changed yarn dev to execute sapper dev --no-hot.

@samuelhnrq
Copy link

Well I've first found this same issue in the template repo sveltejs/sapper-template#153 but I believe the issue seems to be with sapper internal code itself, and no one seems to actually try to fix he issue instead of simply disabling hot reloading...

arnellebalane added a commit to arnellebalane/arnellebalane.com-v6 that referenced this issue Dec 28, 2019
@akvadrako
Copy link

Maybe these are helpful:

https://github.com/rixo/sapper-template-hot#webpack
sveltejs/svelte#3632

@AlbertMarashi

This comment has been minimized.

@ghost
Copy link

ghost commented Aug 20, 2020

Any update on this?
At least update the Webpack template to include --no-hot.
I am getting this error with horReload option disabled:

Uncaught TypeError: Cannot read property 'status' of undefined
    at check (sapper-dev-client.js:6)
    at EventSource.source.onmessage (sapper-dev-client.js:37)

@samuelhnrq
Copy link

Well very long since I last visited this issue but there is even webpack 5 now...

@antony
Copy link
Member

antony commented Aug 20, 2020

We're more likely to drop webpack support than implement webpack 5 at this point, so I wouldn't hold your breath.

@ghost
Copy link

ghost commented Aug 20, 2020

@antony OK, lets just use nuxt.js then.

@antony
Copy link
Member

antony commented Aug 20, 2020

nuxt.js is another excellent option for building PWAs

@samuelhnrq
Copy link

Well, as it stands the webpack implementation is simply broken. Shouldn't it be removed from the README.md?

@antony
Copy link
Member

antony commented Oct 12, 2020

as an alternative, somebody from the community who has expertise in webpack could help us fix it, or migrate to webpack 5 perhaps?

@ehrencrona
Copy link
Contributor

This may be somewhat off-topic, but what is the benefit of offering two different bundlers? If there's a compelling reason to keep offering webpack I'd be happy to look into this, but if we could simplify things at no cost by just dropping webpack it's probably not worth the effort.

@benmccann
Copy link
Member

There is a PR pending for webpack 5 support in svelte-loader: sveltejs/svelte-loader#136

@benmccann
Copy link
Member

SvelteKit supports live reload and is where all our development focus is currently, so I'd recommend using that

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

No branches or pull requests

9 participants