mirror of
https://github.com/Awuqing/BackupX.git
synced 2026-05-06 20:02:41 +08:00
33 lines
955 B
JavaScript
33 lines
955 B
JavaScript
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'],
|
|
},
|
|
});
|