diff --git a/vite.config.ts b/vite.config.ts index 8fcdef16..8034b963 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -15,11 +15,13 @@ export default defineConfig({ } }, optimizeDeps: { - // flowbite-svelte ships TypeScript optional-param syntax (x?, date?) in its compiled - // .svelte dist files. Esbuild's pre-bundler treats them as plain JS and rejects the `?` - // syntax. Excluding it here lets vite-plugin-svelte handle it properly instead. - // Re-evaluate if flowbite-svelte releases a clean JS dist (check when upgrading). - exclude: ['@codemirror/*', 'flowbite-svelte'], + // @codemirror/* uses dynamic imports that confuse esbuild's pre-bundler; excluded here + // so vite-plugin-svelte handles them through the normal transform pipeline instead. + // flowbite-svelte: ONLY exclude if you upgrade to a version that ships TypeScript + // optional-param syntax (x?, date?) in its compiled dist files — verify with grep + // before adding it back. Excluding it causes tailwindcss 4.3+ to receive raw .svelte + // file content (including TypeScript) for style virtual modules, which it rejects. + exclude: ['@codemirror/*'], include: [] }, ssr: {