-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
34 lines (32 loc) · 870 Bytes
/
vite.config.ts
File metadata and controls
34 lines (32 loc) · 870 Bytes
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
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
import { readFileSync } from 'fs';
const pkg = JSON.parse(readFileSync('./package.json', 'utf-8'));
const version = process.env.APP_VERSION || pkg.version;
export default defineConfig({
plugins: [sveltekit()],
build: {
modulePreload: {
resolveDependencies: (_filename, deps) => deps.filter((d) => !d.endsWith('.css'))
}
},
server: {
host: '0.0.0.0'
},
define: {
__APP_VERSION__: JSON.stringify(version)
},
test: {
include: ['src/**/*.test.ts', 'tests/**/*.test.ts'],
environment: 'node',
setupFiles: ['tests/setup.ts'],
testTimeout: 10_000,
hookTimeout: 10_000,
pool: 'forks',
coverage: {
provider: 'v8',
include: ['src/lib/**/*.ts', 'src/routes/api/**/*.ts'],
exclude: ['**/*.test.ts', '**/tests/**', '**/__tests__/**']
}
}
});