What are Svelte compile options and configuration?

Answer

Svelte is configured in svelte.config.js at the project root. Key options: kit.adapter: deployment adapter. kit.alias: path aliases (e.g., $lib maps to src/lib by default). kit.csrf: CSRF protection for form actions (enabled by default). kit.paths.base: base path for deploying to a subdirectory. compilerOptions: Svelte compiler options — runes: true (opt-in to Svelte 5 runes mode), accessors: true (generate getters/setters for all component props). Vite configuration is in vite.config.js. The src/app.html is the HTML template — add global head tags, meta, and the body placeholder %sveltekit.body%. TypeScript is configured with tsconfig.json — SvelteKit generates a tsconfig.json based on your config. src/app.d.ts defines TypeScript types for Locals, PageData, and Platform.