-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathvite.config.js
41 lines (39 loc) · 1.04 KB
/
vite.config.js
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
/* eslint-disable import/no-unused-modules,import/no-extraneous-dependencies */
import { fileURLToPath, URL } from 'node:url';
import vue from '@vitejs/plugin-vue';
import { defineConfig } from 'vite';
import { configDefaults } from 'vitest/dist/config.js';
// https://vitejs.dev/config/
export default defineConfig({
build: {
// Make sure this matches the Chromium version built into NW.js
target: 'chrome131',
outDir: 'dist-vue'
},
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
'@@': fileURLToPath(new URL('./tests', import.meta.url))
}
},
test: {
globals: true,
environment: 'happy-dom',
coverage: {
exclude: [
...(configDefaults?.coverage?.exclude || []),
'**/dist-vue/**',
'./server.cjs'
],
reportsDirectory: './tests/unit/coverage'
},
root: '.',
setupFiles: [
'./tests/unit/setup.js'
],
snapshotSerializers: [
'./node_modules/vue3-snapshot-serializer/index.js'
]
}
});