or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

examples

edge-cases.mdreal-world-scenarios.md
index.md
tile.json

vite-plugin.mddocs/reference/

Vite Plugin

Configure Vite with the SvelteKit plugin for development and production builds.

Capabilities

SvelteKit Plugin

/**
 * Get SvelteKit Vite plugins
 * @returns Promise resolving to array of Vite plugins
 */
function sveltekit(): Promise<Plugin[]>;

Usage:

// vite.config.ts
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';

export default defineConfig({
  plugins: [sveltekit()]
});

With Additional Plugins:

import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import { imagetools } from 'vite-imagetools';

export default defineConfig({
  plugins: [
    sveltekit(),
    imagetools()
  ],
  server: {
    port: 3000
  }
});

Notes

  • Import from @sveltejs/kit/vite
  • Use in vite.config.js or vite.config.ts
  • Returns array of Vite plugins (not single plugin)
  • Handles:
    • File-based routing
    • SSR compilation
    • Virtual module resolution ($app/*, $service-worker)
    • Build optimization
    • Development server
  • SvelteKit configuration in svelte.config.js, not Vite config
  • Compatible with other Vite plugins