Skip to content

Commit

Permalink
Update svelte.config.js to properly handle TypeScript
Browse files Browse the repository at this point in the history
TypeScript syntax inside the script tags of SvelteKit routes and components isn't properly handled without adding vitePreprocess, crashing the application.

With vitePreprocess, it works.
  • Loading branch information
LXIF authored Nov 27, 2024
1 parent 3200e13 commit 4befd8f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';

/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: vitePreprocess(),
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
Expand Down

0 comments on commit 4befd8f

Please sign in to comment.