2022-06-13 23:06:41 +08:00
|
|
|
import { defineConfig } from 'vitest/config'
|
2022-02-21 14:28:22 +08:00
|
|
|
import Vue from '@vitejs/plugin-vue'
|
|
|
|
import VueJsx from '@vitejs/plugin-vue-jsx'
|
2022-09-16 22:57:41 +08:00
|
|
|
import VueMacros from 'unplugin-vue-macros/vite'
|
2022-02-21 14:28:22 +08:00
|
|
|
|
|
|
|
export default defineConfig({
|
2022-09-16 22:57:41 +08:00
|
|
|
plugins: [
|
|
|
|
VueMacros({
|
|
|
|
setupComponent: false,
|
|
|
|
setupSFC: false,
|
|
|
|
plugins: {
|
|
|
|
vue: Vue(),
|
|
|
|
vueJsx: VueJsx(),
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
],
|
2022-04-12 20:17:49 +08:00
|
|
|
optimizeDeps: {
|
2022-04-19 12:46:57 +08:00
|
|
|
disabled: true,
|
2022-04-12 20:17:49 +08:00
|
|
|
},
|
2022-02-21 14:28:22 +08:00
|
|
|
test: {
|
2022-04-20 17:02:44 +08:00
|
|
|
clearMocks: true,
|
2022-02-21 14:28:22 +08:00
|
|
|
environment: 'jsdom',
|
2022-04-19 16:51:44 +08:00
|
|
|
setupFiles: ['./vitest.setup.ts'],
|
2024-04-20 19:54:47 +08:00
|
|
|
reporters: ['default'],
|
2024-04-11 17:48:34 +08:00
|
|
|
testTransformMode: {
|
|
|
|
web: ['*.{ts,tsx}'],
|
2022-04-17 15:24:33 +08:00
|
|
|
},
|
2024-01-11 15:05:03 +08:00
|
|
|
coverage: {
|
|
|
|
reporter: ['text', 'json-summary', 'json'],
|
2024-05-06 10:02:26 +08:00
|
|
|
exclude: [
|
|
|
|
'play/**',
|
|
|
|
'packages/locale/lang/**',
|
|
|
|
'packages/components/*/style/**',
|
|
|
|
],
|
2024-01-11 15:05:03 +08:00
|
|
|
},
|
2022-02-21 14:28:22 +08:00
|
|
|
},
|
|
|
|
})
|