-
Notifications
You must be signed in to change notification settings - Fork 4
/
vite.config.js
executable file
·50 lines (49 loc) · 1.22 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
42
43
44
45
46
47
48
49
50
import path from 'path';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import { configDefaults } from 'vitest/config';
import dts from 'vite-plugin-dts';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(), dts()],
test: {
coverage: {
provider: 'v8',
reporter: ['html', 'json'],
reportsDirectory: './unit-coverage'
},
globals: true,
environment: 'happy-dom',
include: ['tests/unit/**/*.spec.*'],
exclude: [...configDefaults.exclude, '**/playwright/**', '**/dev/**', '**/docs/**'],
mockReset: true,
restoreMocks: true,
testTimeout: false ? 30000 : 10000,
hookTimeout: false ? 30000 : 10000,
teardownTimeout: false ? 30000 : 10000,
reporters: ['verbose'],
setupFiles: ['./tests/bootstrap.js']
},
build: {
lib: {
entry: path.resolve(__dirname, 'src/index.js'),
name: 'Vuuri',
fileName: 'vuuri'
},
outDir: path.resolve(__dirname, 'dist')
},
rollupOptions: {
external: ["vue"],
output: {
globals: {
vue: "Vue",
},
},
},
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
'@test': path.resolve(__dirname, 'tests')
}
}
});