diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 0017a41..2781ad6 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,13 +1,19 @@ diff --git a/svelte.config.js b/svelte.config.js index 8b42889..6ae3ddd 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -12,7 +12,10 @@ const config = { } }, preprocess: [], - extensions: ['.svelte'] + + compilerOptions: { + runes: true + } }; export default config; diff --git a/vite.config.js b/vite.config.js index 2186814..13e8505 100644 --- a/vite.config.js +++ b/vite.config.js @@ -4,7 +4,44 @@ import { defineConfig } from 'vite'; export default defineConfig({ plugins: [sveltekit(), tailwindcss()], + + // Optimize dependency pre-bundling optimizeDeps: { - include: ['@portabletext/svelte', '@lucide/svelte'] + include: [ + '@portabletext/svelte', + '@lucide/svelte', + '@skeletonlabs/skeleton-svelte', + '@sanity/client' + ], + // Force pre-bundle these dependencies + force: false + }, + + // Build optimizations + build: { + target: 'esnext', + minify: 'esbuild', + cssMinify: true, + }, + + // Server optimizations for dev + server: { + fs: { + // Allow serving files from project root + strict: false + }, + warmup: { + // Pre-transform commonly used files + clientFiles: [ + './src/routes/+layout.svelte', + './src/routes/+page.svelte', + './src/components/layout/*.svelte' + ] + } + }, + + // Resolve optimizations + resolve: { + dedupe: ['svelte'] } });