-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
78 lines (69 loc) · 1.77 KB
/
vite.config.ts
File metadata and controls
78 lines (69 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import { sveltekit } from '@sveltejs/kit/vite';
import { svelteTesting } from '@testing-library/svelte/vite';
import { playwright } from '@vitest/browser-playwright';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [sveltekit()],
server: {
headers: {
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp'
}
},
optimizeDeps: {
include: [
'svelte-tether',
'@lucide/svelte/icons/file-up',
'@lucide/svelte/icons/clapperboard',
'@lucide/svelte/icons/folder-up',
'@lucide/svelte/icons/pause',
'@lucide/svelte/icons/play',
'@lucide/svelte/icons/repeat-2',
'@lucide/svelte/icons/rewind',
'@lucide/svelte/icons/x',
'@lucide/svelte/icons/square',
'@lucide/svelte/icons/square-check',
'@lucide/svelte/icons/chevron-down',
'@lucide/svelte/icons/headphone-off',
'@lucide/svelte/icons/headphones'
],
exclude: ['@ffmpeg/ffmpeg', '@ffmpeg/core']
},
test: {
projects: [
{
extends: './vite.config.ts',
plugins: [svelteTesting()],
optimizeDeps: {
include: ['@testing-library/jest-dom/vitest', '@testing-library/svelte']
},
resolve: {
conditions: ['browser']
},
test: {
name: 'client',
environment: 'jsdom',
clearMocks: true,
include: ['src/**/*.svelte.{test,spec}.{js,ts}'],
exclude: ['src/lib/server/**'],
browser: {
enabled: true,
headless: true,
screenshotFailures: false,
provider: playwright(),
instances: [{ browser: 'chromium' }]
}
}
},
{
extends: './vite.config.ts',
test: {
name: 'server',
environment: 'node',
include: ['src/**/*.{test,spec}.{js,ts}'],
exclude: ['src/**/*.svelte.{test,spec}.{js,ts}']
}
}
]
}
});