43 lines
1000 B
TypeScript
43 lines
1000 B
TypeScript
import { defineConfig } from 'vitest/config'
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
import packageJson from './package.json'
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
// fix from https://github.com/vitest-dev/vitest/issues/6992#issuecomment-2509408660
|
|
resolve: {
|
|
conditions: ['@tanstack/custom-condition'],
|
|
},
|
|
environments: {
|
|
ssr: {
|
|
resolve: {
|
|
conditions: ['@tanstack/custom-condition'],
|
|
},
|
|
},
|
|
},
|
|
test: {
|
|
name: packageJson.name,
|
|
dir: './src',
|
|
watch: false,
|
|
environment: 'jsdom',
|
|
setupFiles: ['test-setup.ts'],
|
|
coverage: {
|
|
enabled: !!process.env.CI,
|
|
provider: 'istanbul',
|
|
include: ['src/**/*'],
|
|
exclude: ['src/__tests__/**'],
|
|
},
|
|
typecheck: {
|
|
enabled: true,
|
|
checker: '../../node_modules/typescript/bin/tsc',
|
|
},
|
|
onConsoleLog: function (log) {
|
|
if (log.includes('Download the Vue Devtools extension')) {
|
|
return false
|
|
}
|
|
return undefined
|
|
},
|
|
},
|
|
})
|