Files
headroom/frontend/vite.config.mts

26 lines
622 B
TypeScript

import { sveltekit } from '@sveltejs/kit/vite';
import { svelteTesting } from '@testing-library/svelte/vite';
import { defineConfig } from 'vite';
import path from 'path';
export default defineConfig({
plugins: [sveltekit(), svelteTesting()],
server: {
port: 5173,
host: '0.0.0.0',
proxy: {
'/api': {
target: process.env.BACKEND_URL || 'http://backend:3000',
changeOrigin: true
}
}
},
test: {
include: ['tests/**/*.{test,spec}.{js,ts}'],
exclude: ['tests/e2e/**/*'],
globals: true,
environment: 'happy-dom',
setupFiles: ['./tests/setup.ts']
}
});