-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
32 lines (31 loc) · 1.21 KB
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/// <reference types="vitest/config" />
//import { coverageConfigDefaults } from 'vitest/config'
import { defineConfig } from 'vite'
import { resolve } from 'path'
import browserslistToEsbuild from 'browserslist-to-esbuild'
export default defineConfig({
esbuild: {
target: ['es2022', 'firefox128']
// https://vitejs.dev/config/build-options#build-target
// https://vitejs.dev/guide/features#target
// https://esbuild.github.io/api/#target
//target: ['esnext'].concat(browserslistToEsbuild('>0.5%, not dead, not op_mini all'))
},
test: { // Vitest configuration
dir: 'src', // Base directory to scan for the test files. Default: same as root
coverage: {
reportsDirectory: '.coverage',
reporter: ['text', 'text-summary', 'html', 'lcovonly'],
},
browser: {
provider: 'playwright', // or 'webdriverio'
enabled: true,
name: 'chromium', // browser name is required
// headless: true,
screenshotFailures: false,
},
// The glob patterns Jest uses to detect test files:
// "**/__tests__/**/*.[jt]s?(x)"
// "**/?(*.)+(spec|test).[tj]s?(x)"
},
})