-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathvite.config.ts
More file actions
51 lines (47 loc) · 1.15 KB
/
Copy pathvite.config.ts
File metadata and controls
51 lines (47 loc) · 1.15 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
import { sveltekit } from '@sveltejs/kit/vite'
import { defineConfig } from 'vitest/config'
import inject_socket_io from './server/socket-handler'
// # Dev
// npm run dev
// # Production
// npm run build
// node server.js
const web_socket = {
name: 'sveltekit-socket-io',
// eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-explicit-any
configureServer(server: any): void {
inject_socket_io(server.httpServer)
},
}
export default defineConfig({
plugins: [sveltekit(), web_socket],
define: {
// eslint-disable-next-line @typescript-eslint/naming-convention
'import.meta.vitest': 'undefined',
},
test: {
include: ['src/**/*.test.ts'],
hookTimeout: 3000,
teardownTimeout: 0,
coverage: {
all: true,
include: ['src/**/*.ts'],
exclude: [
'src/**/+*.ts',
'src/app.d.ts',
'src/hooks.server.ts',
'src/scripts/create_git_branch.ts',
],
reporter: ['lcov', 'text'],
},
},
server: {
host: true,
},
resolve: {
alias: {
// eslint-disable-next-line @typescript-eslint/naming-convention
'.prisma/client/index-browser': './node_modules/.prisma/client/index-browser.js',
},
},
})