Files
gw-svelte/vite.config.ts
T

21 lines
537 B
TypeScript
Raw Normal View History

2026-05-02 08:26:18 +12:00
import { sveltekit } from '@sveltejs/kit/vite';
import { svelteTesting } from '@testing-library/svelte/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [svelteTesting({ autoCleanup: false }), sveltekit()],
server: {
proxy: {
'/api/submit': {
target: 'http://localhost:8000',
rewrite: (path) => path.replace(/^\/api\/submit/, '/submit')
}
}
},
test: {
environment: 'jsdom',
setupFiles: ['./vitest.setup.ts'],
include: ['src/**/*.test.ts']
}
});