Skip to content
This repository has been archived by the owner on Dec 30, 2021. It is now read-only.

Svelte hmr doesn't pick the style changes #69

Open
germanftorres opened this issue May 25, 2020 · 2 comments
Open

Svelte hmr doesn't pick the style changes #69

germanftorres opened this issue May 25, 2020 · 2 comments

Comments

@germanftorres
Copy link

germanftorres commented May 25, 2020

Hi,
I'm still trying to understand how hmr works in snowpack.

Using the default template 0.8.0. When I change the css part of App.js, the hmr module reloads only the js part of the component. I see following resources loaded in the network tab.

_dist_/index.js?mtime=159....
_dist_/App.js?mtime=159

But as the change is in the css part, and svelte regenerates the scoped css, the css part of the component App.css.proxy.js should be loaded as well .

Thanks so much for all the great features in snowpack.

@FredKSchott
Copy link
Owner

FredKSchott commented May 25, 2020

That's an interesting problem! I've got a partial fix so that style changes are updated as expected, but there's still a problem in the compiler around where css isn't removed on destroy: sveltejs/svelte#4901

It shouldn't block you, but it just means you may see some outdated CSS on the page until you do a full page reload until that issue is fixed.

@dlindenkreuz
Copy link
Contributor

Same issue applies to Vue HMR (clean setup using @snowpack/app-template-vue). New styles are not applied until the cache gets busted in some way.

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

3 participants