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

Client side doesn't have hot reload #675

Closed
shavyg2 opened this issue May 8, 2019 · 7 comments
Closed

Client side doesn't have hot reload #675

shavyg2 opened this issue May 8, 2019 · 7 comments

Comments

@shavyg2
Copy link

shavyg2 commented May 8, 2019

let me know if this is the correct repo to post this or if i should move it to the template

https://github.com/sveltejs/sapper/blob/master/sapper-dev-client.js#L6

module.hot is undefined.

I think this is because of this

https://github.com/sveltejs/sapper-template/blob/79be87c3f5cb90ee1afb2561965597f9e4273d26/webpack.config.js#L25

@Conduitry
Copy link
Member

As noted in the comment, webpack HMR isn't working in Svelte v3 pending that issue and some hooks provided by the compiler to enable it.

@shavyg2
Copy link
Author

shavyg2 commented May 8, 2019

Ye I am saying that the JavaScript errors because hot is not defined. Are you saying it doesn't matter because there is no hot module reloading regardless?

@jcollum
Copy link

jcollum commented Jul 28, 2019

He's saying use rollup instead of webpack until they fix that bug sveltejs/svelte#2377

But I started my project with webpack so now I have to translate to rollup 😢

@TrungRueta
Copy link

@jcollum you can just use webpack but disable hot-replacement feature in sapper.
open package.json, at line dev: "sapper dev" change to dev: "sapper dev --no-hot" to disable hot reload.
Sapper will auto use live reload when hot reload disabled, and from now on it work 100% same as rollup setup.

@jcollum
Copy link

jcollum commented Jul 30, 2019

Getting rollup going wasn't any big deal.

@TrungRueta
Copy link

rollup has not hot-replace feature, it only has live-reload, so issue not raised in rollup like webpack

tyom added a commit to tyom/sapper-template that referenced this issue Nov 24, 2019
Sapper currently doesn’t support HMR
sveltejs/sapper#675
tyom added a commit to tyom/sapper-template that referenced this issue Nov 24, 2019
Sapper currently doesn’t support HMR
sveltejs/sapper#675
@antony
Copy link
Member

antony commented Feb 3, 2020

Closing this since there is an active effort on Svelte to get HMR working which will solve this.

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