Skip to content

Svelte 3 HMR #92

Closed
Closed
@rixo

Description

@rixo

I've seen HMR support is on its way: sveltejs/svelte#2377

But I couldn't wait to play with svelte-native, and no HMR is really a bummer there. Because the smallest change triggers a full relaunch of the app on the device, losing the page you were working on in the process...

So I hacked myself together a preliminary HMR for svelte3 & svelte-native.

It's more experiment than anything. It mainly only supports restoring state by public (exported) props, and it's not very stable.

But it already proved useful to me so I was thinking of sharing it, as a temporary solution for other impatient people. Maybe it could also be useful to work around HMR support for svelte-native since, as I have found, it presents its own challenges.

So I wanted to see if you had any thought to share on this. Like maybe how it goes with your projected timing, or anything ?

Also, I've got a question to ask. My changes also impacted the svelte-dev-helper project. For simpler logistics, I was thinking of merging svelte-dev-helper in my fork of svelte-loader. Is there a specific reason why it's not already the case? The two projects seem pretty tightly coupled to me, is there something I missed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions