lolosia-web/vitest.config.ts

21 lines
552 B
TypeScript
Raw Permalink Normal View History

2023-02-02 16:07:38 +08:00
import { defineConfig } from 'vitest/config'
import Vue from '@vitejs/plugin-vue'
import VueJsx from '@vitejs/plugin-vue-jsx'
2023-06-25 15:05:43 +08:00
// @ts-ignore
2023-02-02 16:07:38 +08:00
import DefineOptions from 'unplugin-vue-define-options/vite'
export default defineConfig({
plugins: [Vue(), VueJsx(), DefineOptions()],
optimizeDeps: {
disabled: true
},
test: {
clearMocks: true,
environment: 'jsdom',
//setup 文件的路径。它们将运行在每个测试文件之前。
setupFiles: ['./vitest.setup.ts'],
transformMode: {
web: [/\.[jt]sx$/]
}
}
})