svelte-materialify icon indicating copy to clipboard operation
svelte-materialify copied to clipboard

ButtonGroup does not work with HMR in the latest @sveltejs/vite-plugin-svelte

Open gthomas3 opened this issue 2 years ago • 0 comments

I understand this will not get fixed, I'm simply logging it for posterity.

ButtonGroup references ItemGroup which contains a <script context="module"> to export the shared Context.

The current version of @sveltejs/vite-plugin-svelte (1.0.0-next.35) does not support context module blocks during HMR, and consequently the ButtonGroup causes the app to throw an error, and lead to unexpected behaviour.

This has been added to the vite-plugin-svelte 1.0.0 milestone, but until then the ButtonGroup component is not available in the context of HMR.

https://github.com/sveltejs/vite-plugin-svelte/issues/134

gthomas3 avatar Jan 27 '22 18:01 gthomas3