Open History to see the last commit
1import vue from 'unplugin-vue/vite'
2import { defineConfig } from 'vitest/config'
3import packageJson from './package.json'
4β
5export default defineConfig({
6 plugins: [vue()],
7 // fix from https://github.com/vitest-dev/vitest/issues/6992#issuecomment-2509408660
8 resolve: {
9 conditions: ['@tanstack/custom-condition'],
10 },
11 environments: {
12 ssr: {
13 resolve: {
14 conditions: ['@tanstack/custom-condition'],
15 },
16 },
17 },
18 test: {
19 name: packageJson.name,
20 dir: './src',
21 watch: false,
22 environment: 'jsdom',
23 setupFiles: ['test-setup.ts'],
24 coverage: {
25 enabled: !!process.env.CI,
26 provider: 'istanbul',
27 include: ['src/**/*'],
28 exclude: ['src/__tests__/**'],
29 },
30 typecheck: {
31 enabled: true,
32 checker: '../../node_modules/typescript/bin/tsc',
33 },
34 restoreMocks: true,
35 unstubEnvs: true,
36 onConsoleLog: function (log) {
37 if (log.includes('Download the Vue Devtools extension')) {
38 return false
39 }
40 return undefined
41 },
42 },
43})