2024-02-24 10:05:19 +00:00
|
|
|
import path from 'node:path'
|
|
|
|
import url from 'node:url'
|
2022-05-06 08:00:31 +00:00
|
|
|
import { defineConfig } from 'vitest/config'
|
|
|
|
|
2024-02-24 10:05:19 +00:00
|
|
|
const _dirname = path.dirname(url.fileURLToPath(import.meta.url))
|
|
|
|
|
2022-05-06 08:00:31 +00:00
|
|
|
export default defineConfig({
|
|
|
|
test: {
|
2023-06-08 09:56:21 +00:00
|
|
|
include: ['**/__tests__/**/*.spec.[tj]s'],
|
2022-05-06 08:00:31 +00:00
|
|
|
exclude: [
|
|
|
|
'**/node_modules/**',
|
|
|
|
'**/dist/**',
|
2022-05-09 07:36:14 +00:00
|
|
|
'./playground/**/*.*',
|
|
|
|
'./playground-temp/**/*.*',
|
2022-05-09 18:49:38 +00:00
|
|
|
],
|
|
|
|
testTimeout: 20000,
|
2024-06-13 09:10:18 +00:00
|
|
|
isolate: false,
|
2022-05-06 08:00:31 +00:00
|
|
|
},
|
|
|
|
esbuild: {
|
2023-08-15 13:28:17 +00:00
|
|
|
target: 'node18',
|
2022-05-06 08:00:31 +00:00
|
|
|
},
|
2023-12-01 10:24:50 +00:00
|
|
|
publicDir: false,
|
2024-02-24 10:05:19 +00:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'vite/runtime': path.resolve(
|
|
|
|
_dirname,
|
|
|
|
'./packages/vite/src/runtime/index.ts',
|
|
|
|
),
|
|
|
|
},
|
|
|
|
},
|
2022-05-06 08:00:31 +00:00
|
|
|
})
|