mirror of
https://github.com/vitejs/vite.git
synced 2024-11-21 22:59:10 +00:00
123ef4c47c
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
32 lines
824 B
TypeScript
32 lines
824 B
TypeScript
import { resolve } from 'node:path'
|
|
import { defineConfig } from 'vitest/config'
|
|
|
|
const timeout = process.env.CI ? 50000 : 30000
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
'~utils': resolve(__dirname, './playground/test-utils'),
|
|
},
|
|
},
|
|
test: {
|
|
include: ['./playground/**/*.spec.[tj]s'],
|
|
setupFiles: ['./playground/vitestSetup.ts'],
|
|
globalSetup: ['./playground/vitestGlobalSetup.ts'],
|
|
testTimeout: timeout,
|
|
hookTimeout: timeout,
|
|
reporters: 'dot',
|
|
deps: {
|
|
// Prevent Vitest from running the workspace packages in Vite's SSR runtime
|
|
moduleDirectories: ['node_modules', 'packages'],
|
|
},
|
|
onConsoleLog(log) {
|
|
if (log.match(/experimental|jit engine|emitted file|tailwind/i))
|
|
return false
|
|
},
|
|
},
|
|
esbuild: {
|
|
target: 'node14',
|
|
},
|
|
})
|