-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
47 lines (46 loc) · 1.05 KB
/
Copy pathvite.config.ts
File metadata and controls
47 lines (46 loc) · 1.05 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
/// <reference types="vitest" />
import { defineConfig } from 'vitest/config';
import tsconfigPaths from 'vite-tsconfig-paths';
import tmp from 'tmp';
export default defineConfig({
plugins: [tsconfigPaths()],
build: {
outDir: 'dist',
lib: {
entry: 'src/index.ts',
formats: ['es']
},
rollupOptions: {
external: [
/^node:/,
/^@modelcontextprotocol\/sdk/,
/^node_modules/,
'pino',
'tmp',
'zod'
],
output: {
preserveModules: true,
preserveModulesRoot: 'src',
entryFileNames: '[name].js'
}
}
},
test: {
globals: true,
environment: 'node',
include: ['src/**/*.{test,spec}.{js,ts}'],
coverage: {
provider: 'v8',
reporter: ['json', 'text', 'html'],
include: ['src/**/*.ts'],
exclude: ['src/**/*.{test,spec}.ts'],
// @ts-ignore
reportsDirectory: process.env.COVERAGE_REPORTS_DIR ?? tmp.dirSync().name,
},
typecheck: {
enabled: true,
tsconfig: './tsconfig.json',
},
},
});