Fix $state runtime error: rename rune stores to .svelte.ts
$state runes only work in .svelte and .svelte.ts files. The toasts and theme stores used $state in plain .ts files, which compiled in dev but crashed in production SSR. Renamed and updated all imports. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { fly } from 'svelte/transition';
|
||||
import { getToasts, removeToast, type ToastType } from '$lib/stores/toasts.js';
|
||||
import { getToasts, removeToast, type ToastType } from '$lib/stores/toasts.svelte.js';
|
||||
|
||||
const toasts = $derived(getToasts());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user