TheComputerM / svelte-materialify

A Material UI Design Component library for Svelte heavily inspired by vuetify.
https://svelte-materialify.vercel.app
MIT License
623 stars 85 forks source link

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

Open gthomas3 opened 2 years ago

gthomas3 commented 2 years ago

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