2026-05-21 10:38:04 +08:00
|
|
|
/// <reference types="vitest" />
|
2025-11-19 02:14:37 +08:00
|
|
|
import path from 'path'
|
2026-05-21 10:38:04 +08:00
|
|
|
import { defineConfig } from 'vitest/config'
|
2025-11-19 02:14:37 +08:00
|
|
|
import react from '@vitejs/plugin-react-swc'
|
|
|
|
|
import { TanStackRouterVite } from '@tanstack/router-plugin/vite'
|
|
|
|
|
|
|
|
|
|
// https://vite.dev/config/
|
|
|
|
|
export default defineConfig({
|
2026-03-12 01:55:14 +08:00
|
|
|
base: '',
|
2025-11-19 02:14:37 +08:00
|
|
|
plugins: [react(), TanStackRouterVite()],
|
|
|
|
|
resolve: {
|
|
|
|
|
alias: {
|
|
|
|
|
'@': path.resolve(__dirname, './src'),
|
|
|
|
|
|
|
|
|
|
// fix loading all icon chunks in dev mode
|
|
|
|
|
// https://github.com/tabler/tabler-icons/issues/1233
|
|
|
|
|
'@tabler/icons-react': '@tabler/icons-react/dist/esm/icons/index.mjs',
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-05-21 10:38:04 +08:00
|
|
|
test: {
|
|
|
|
|
globals: true,
|
|
|
|
|
environment: 'jsdom',
|
|
|
|
|
setupFiles: './src/test/setup.ts',
|
|
|
|
|
css: false,
|
|
|
|
|
},
|
2025-11-19 02:14:37 +08:00
|
|
|
})
|