mirror of
https://github.com/Awuqing/BackupX.git
synced 2026-05-07 04:22:40 +08:00
35 lines
814 B
TypeScript
35 lines
814 B
TypeScript
import { defineConfig } from 'vitest/config'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://127.0.0.1:8340',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
'vendor-react': ['react', 'react-dom', 'react-router-dom'],
|
|
'vendor-arco': ['@arco-design/web-react'],
|
|
'vendor-echarts': ['echarts', 'echarts-for-react'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
test: {
|
|
environment: 'jsdom',
|
|
setupFiles: './src/test/setup.ts',
|
|
globals: true,
|
|
include: ['src/**/*.test.ts', 'src/**/*.test.tsx'],
|
|
exclude: ['src/components/auth-guard.test.tsx', 'src/stores/auth.test.ts'],
|
|
},
|
|
})
|
|
|