skillhub/web/vite.config.ts
dongmucat 738e8f8cee fix(web): stabilize frontend validation
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-10 18:00:10 +08:00

45 lines
923 B
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'
const LEGACY_BROWSER_TARGETS = ['chrome83', 'edge83', 'firefox78', 'safari14']
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
build: {
target: LEGACY_BROWSER_TARGETS,
cssTarget: LEGACY_BROWSER_TARGETS,
},
optimizeDeps: {
esbuildOptions: {
target: LEGACY_BROWSER_TARGETS,
},
},
test: {
exclude: ['**/node_modules/**', '**/e2e/**'],
testTimeout: 30000,
hookTimeout: 30000,
},
server: {
port: 3000,
watch: {
usePolling: true,
interval: 150,
},
proxy: {
'/api': {
target: 'http://localhost:8080',
changeOrigin: true,
},
'/oauth2': {
target: 'http://localhost:8080',
changeOrigin: true,
},
},
},
})