You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
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.
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)
Reacted by Guy Shaanan, Pablo, Vidar Eldøy, Adrià, Ben Winding, Samuel Henrique, Niklas Higi, Caleb Anthony, 流浪大法师, Stijn de Witt and 6 more
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.
Reacted by Alex, Felipe Torres (fforres), LookRain, Sandrina Pereira, Anton St., PlainBane, Caleb Anthony, Darkhan, Begoña Álvarez de la Cruz, Banly Tong and 17 more
Reacted by Sandrina Pereira, Ben Winding, Caleb Anthony, 流浪大法师, Hairok, rockabee and Luke
Reacted by Felipe Torres (fforres), Samuel Henrique, 流浪大法师, Bibby, Jonathan Ekberg, Hairok and zakkor
Reacted by Kapil Pipaliya, 流浪大法师, Paulo Ramos, Hairok and Noah Versace Salvi
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...
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.
Activity
Aias commentedon Jun 30, 2019
Also seeing this, with the following error logged to the console:
jacobstanley commentedon 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 devto executesapper dev --no-hot.samuelhnrq commentedon Sep 3, 2019
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...
Disable sapper HMR to enable HMR. Whut?
akvadrako commentedon Feb 20, 2020
Maybe these are helpful:
https://github.com/rixo/sapper-template-hot#webpack
sveltejs/svelte#3632
AlbertMarashi commentedon Apr 14, 2020
samuelhnrq commentedon Aug 20, 2020
Well very long since I last visited this issue but there is even webpack 5 now...
antony commentedon 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.
antony commentedon Aug 20, 2020
nuxt.js is another excellent option for building PWAs
samuelhnrq commentedon Oct 12, 2020
Well, as it stands the webpack implementation is simply broken. Shouldn't it be removed from the README.md?
antony commentedon 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 commentedon Oct 12, 2020
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 commentedon Oct 12, 2020
There is a PR pending for webpack 5 support in svelte-loader: sveltejs/svelte-loader#136
benmccann commentedon Mar 16, 2021
SvelteKit supports live reload and is where all our development focus is currently, so I'd recommend using that