sagaphone/frontend/vite.config.ts
Tim e5b4f54cd8 Scaffold backend (FastAPI/uv) and frontend (SvelteKit/bun)
Backend: FastAPI app with health check, AppError hierarchy, stderr
logging via LOG_LEVEL, ruff+pyright(strict) config, pytest passing.

Frontend: SvelteKit (TS) with prettier, eslint, vitest (unit +
component), adapter-node for self-hosted deployment on Zeus.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-17 22:12:44 +02:00

45 lines
1.1 KiB
TypeScript

import { defineConfig } from 'vitest/config';
import { playwright } from '@vitest/browser-playwright';
import adapter from '@sveltejs/adapter-node';
import { sveltekit } from '@sveltejs/kit/vite';
export default defineConfig({
plugins: [
sveltekit({
compilerOptions: {
// Force runes mode for the project, except for libraries. Can be removed in svelte 6.
runes: ({ filename }) =>
filename.split(/[/\\]/).includes('node_modules') ? undefined : true
},
adapter: adapter()
})
],
test: {
expect: { requireAssertions: true },
projects: [
{
extends: './vite.config.ts',
test: {
name: 'client',
browser: {
enabled: true,
provider: playwright(),
instances: [{ browser: 'chromium', headless: true }]
},
include: ['src/**/*.svelte.{test,spec}.{js,ts}'],
exclude: ['src/lib/server/**']
}
},
{
extends: './vite.config.ts',
test: {
name: 'server',
environment: 'node',
include: ['src/**/*.{test,spec}.{js,ts}'],
exclude: ['src/**/*.svelte.{test,spec}.{js,ts}']
}
}
]
}
});