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/**/*.*',
|
2022-12-04 07:19:06 +00:00
|
|
|
'./playground-temp/**/*.*',
|
2022-05-09 18:49:38 +00:00
|
|
|
],
|
2022-12-04 07:19:06 +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-12-04 07:19:06 +00:00
|
|
|
},
|
2023-12-01 10:24:50 +00:00
|
|
|
publicDir: false,
|
2024-02-24 10:05:19 +00:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
2024-09-04 09:27:09 +00:00
|
|
|
'vite/module-runner': path.resolve(
|
2024-02-24 10:05:19 +00:00
|
|
|
_dirname,
|
2024-09-04 09:27:09 +00:00
|
|
|
'./packages/vite/src/module-runner/index.ts',
|
2024-02-24 10:05:19 +00:00
|
|
|
),
|
|
|
|
},
|
|
|
|
},
|
2022-05-06 08:00:31 +00:00
|
|
|
})
|