Recently started playing with Svelte using the sveltejs template. Everything is working fine, however when I do any change in the files it doesn't hot reload the changes to the web browser, so I have to manually refresh the page to see the changes. Is there any option in the settings to enable that feature or is it not possible at this point?
The default template (https://github.com/sveltejs/template) uses Rollup, which doesn't support hot module reloading. The webpack version (https://github.com/sveltejs/template-webpack) will support HMR, but first we need to add some hooks to Svelte itself to make it possible. There's an issue you can track here — hopefully we'll be able to do this work soon.
Until then, Tholle's suggestion of using the livereload plugin is probably the best compromise.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With