import { writable, derived } from 'svelte/store'; const VIEWS = import.meta.glob('../views/*.svelte', {eager: true}); export let currentView = writable(); export function navigate(viewName) { let view = VIEWS[`../views/${viewName}.svelte`].default; currentView.set(view); } navigate('Home');