21 lines
537 B
TypeScript
21 lines
537 B
TypeScript
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']
|
|
}
|
|
});
|