Fix Vite HMR bug

This commit is contained in:
space-nuko
2023-06-02 10:33:44 -05:00
parent 32e39c20d6
commit 895e2e4361

View File

@@ -1,5 +1,11 @@
<script context="module" lang="ts">
export const WORKFLOWS_VIEW: any = {}
// workaround a vite HMR bug
// shouts out to @rixo
// https://github.com/sveltejs/svelte/issues/8655
export const WORKFLOWS_VIEW = import.meta.hot?.data?.WORKFLOWS_VIEW || {}
if (import.meta.hot?.data) {
import.meta.hot.data.WORKFLOWS_VIEW = WORKFLOWS_VIEW
}
</script>
<script lang="ts">