-
Notifications
You must be signed in to change notification settings - Fork 1
/
vitest.config.ts
47 lines (43 loc) · 1.4 KB
/
vitest.config.ts
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
import { defineConfig } from 'vitest/config' // 'vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [vue()],
test: {
globals: true,
//environment: 'happy-dom',
environment: 'jsdom',
reporters: ['verbose'],
server: {
deps: {
inline: [
'@kitware/vtk.js',
'@kitware\\+vtk.js',
'd3-array',
'd3-scale',
'd3-time',
'internmap'
]
}
},
coverage: {
provider: 'v8',
reporter: ['lcov', 'text']
}
/*
// solution suggested by CLI, might be related to this issue: https://github.com/koebel/web/pull/2/files
Module /Users/k2/JankariTech/web-app-dicom-viewer/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@kitware/vtk.js/Rendering/Core/VolumeMapper/Constants.js:19 seems to be an ES Module but shipped in a CommonJS package. You might want to create an issue to the package "@kitware/vtk.js" asking them to ship the file in .mjs extension or add "type": "module" in their package.json.
As a temporary workaround you can try to inline the package by updating your config:
// vitest.config.js
export default {
test: {
server: {
deps: {
inline: [
"@kitware/vtk.js"
]
}
}
}
}*/
}
})