Hot reloading with Sveltekit and npx wrangler dev - is it possible?

Hi team, I'm using Svelte5 - and would love to use npx wrangler dev to develop quickly. Did some research and apparently it does support Hot Reloading, however, I've never managed to get it working. Does anyone have any insights or know if this is possible or not?
5 Replies
Hard@Work
Hard@Work2mo ago
wrangler dev does not support hot-reloading with Frameworks. I would recommend using Svelte's dev server
gdesmedt1
gdesmedt1OP2mo ago
Ok, thanks - the main issue there is that the code get's confused with which Database to use, and causes isues as things scale and system gets more complicated, so was hoping to do all within Cloudflares "eco-system". Thanks for getting back to me!
James
James5w ago
I use sym links locally to manage state persistence across apps which don’t support the “persist-to” arg
Tony Leung
Tony Leung5w ago
you will need two separated terminal, one is wrangler dev to spinup the dev server and another screen to watch and build the svelte code. Everytime you save a file in the text editor, the watch command will run the build code. that's the way I'm handling code change in svelte, pretty annoying but it works
James
James5w ago
why not vite?

Did you find this page helpful?