Open Mnigos opened 2 years ago
I installed the svelte-persistent-store library, and got error while importing writable from svelte-persistent-store/dist/local
svelte-persistent-store
writable
svelte-persistent-store/dist/local
theme.svelte
<script lang="ts" context="module"> import { setContext } from 'svelte' import { writable as persist } from 'svelte-persistent-store/dist/local' import type { Writable } from 'svelte/store' export type Theme = 'light' | 'dark' export type ThemeContext = Writable<Theme> const theme = 'light' setContext('theme', persist('theme', theme)) </script> <slot />
Anyone encountering this error may benefit from using the more frequently updated @macfja/svelte-persistent-store package.
I installed the
svelte-persistent-store
library, and got error while importingwritable
fromsvelte-persistent-store/dist/local
theme.svelte