33 lines
878 B
TypeScript
33 lines
878 B
TypeScript
|
|
import { defineConfig } from 'vitest/config'
|
||
|
|
import react from '@vitejs/plugin-react'
|
||
|
|
import tsconfigPaths from 'vite-tsconfig-paths'
|
||
|
|
import path from 'path'
|
||
|
|
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [react(), tsconfigPaths()],
|
||
|
|
test: {
|
||
|
|
globals: true,
|
||
|
|
environment: 'jsdom',
|
||
|
|
include: [
|
||
|
|
'src/**/*.test.{ts,tsx}',
|
||
|
|
'src/**/*.spec.{ts,tsx}',
|
||
|
|
'api/**/*.test.{ts,tsx}',
|
||
|
|
],
|
||
|
|
exclude: ['node_modules', 'dist', 'dist-api', 'release'],
|
||
|
|
setupFiles: ['./vitest.setup.ts'],
|
||
|
|
coverage: {
|
||
|
|
provider: 'v8',
|
||
|
|
reporter: ['text', 'json', 'html'],
|
||
|
|
include: ['src/**/*', 'api/**/*'],
|
||
|
|
exclude: ['node_modules', 'dist', '**/*.d.ts'],
|
||
|
|
},
|
||
|
|
},
|
||
|
|
resolve: {
|
||
|
|
alias: {
|
||
|
|
'@': path.resolve(__dirname, './src'),
|
||
|
|
'@shared': path.resolve(__dirname, './shared'),
|
||
|
|
'@/api': path.resolve(__dirname, './api'),
|
||
|
|
},
|
||
|
|
},
|
||
|
|
})
|