mirror of
https://github.com/appwrite/console.git
synced 2026-04-07 19:17:46 +00:00
59 lines
1.6 KiB
TypeScript
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}']
|
|
}
|
|
}
|
|
]
|
|
}
|
|
});
|