Files
console/vite.config.ts
Chirag Aggarwal 391adec1f7 fix: validations
2026-02-20 13:55:49 +05:30

59 lines
1.6 KiB
TypeScript

import { defineConfig } from 'vitest/config';
import { sveltekit } from '@sveltejs/kit/vite';
import { sentrySvelteKit } from '@sentry/sveltekit';
import { svelteTesting } from '@testing-library/svelte/vite';
export default defineConfig({
plugins: [
sentrySvelteKit({
adapter: 'auto',
sourceMapsUploadOptions: {
org: 'appwrite',
project: 'console'
}
}),
sveltekit()
],
optimizeDeps: {
include: ['echarts']
},
css: {
preprocessorOptions: {
scss: {
silenceDeprecations: ['legacy-js-api']
}
}
},
ssr: {
noExternal: ['@analytics/google-analytics', 'analytics', 'dayjs', 'echarts', 'zrender']
},
server: {
port: 3000
},
test: {
projects: [
{
extends: './vite.config.ts',
plugins: [svelteTesting()],
test: {
name: 'client',
environment: 'jsdom',
clearMocks: true,
include: ['src/**/*.svelte.{test,spec}.{js,ts}'],
exclude: ['src/lib/server/**'],
setupFiles: ['./vitest-setup-client.ts']
}
},
{
extends: './vite.config.ts',
test: {
name: 'server',
environment: 'node',
include: ['src/**/*.{test,spec}.{js,ts}'],
exclude: ['src/**/*.svelte.{test,spec}.{js,ts}']
}
}
]
}
});