9487fb633b
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 43s
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Has been skipped
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 1m55s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m58s
AI Code Review / AI Code Review (pull_request) Successful in 2m8s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 2m11s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m29s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 1m33s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 2m24s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 2m31s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 2m33s
CI/CD Pipeline / Validate - Code Quality (pull_request) Successful in 7m47s
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / CI Gate (pull_request) Successful in 6s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 33s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 1m28s
- vite.config.ts: 添加 testTimeout: 15_000 - useStep5Voice.test.tsx: 冒烟测试单独加 15s 超时兜底
75 lines
1.5 KiB
TypeScript
75 lines
1.5 KiB
TypeScript
/**
|
|
* 性能优化配置
|
|
*/
|
|
import { defineConfig, configDefaults } from "vitest/config"
|
|
import react from "@vitejs/plugin-react"
|
|
import path from "path"
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
exclude: [...configDefaults.exclude, "**/e2e/**"],
|
|
environment: "jsdom",
|
|
globals: true,
|
|
setupFiles: ["./src/test/setup.ts"],
|
|
testTimeout: 15_000, // 全局 15 秒,防止 CI 高负载时偶发超时
|
|
},
|
|
plugins: [
|
|
react({
|
|
fastRefresh: true,
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://localhost:8000",
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
hmr: {
|
|
overlay: true,
|
|
},
|
|
},
|
|
build: {
|
|
cache: true,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
"react-vendor": ["react", "react-dom", "react-router-dom"],
|
|
"antd-vendor": ["antd", "@ant-design/icons"],
|
|
"state-vendor": ["zustand", "@tanstack/react-query", "axios"],
|
|
},
|
|
},
|
|
},
|
|
minify: "esbuild",
|
|
sourcemap: false,
|
|
chunkSizeWarningLimit: 1000,
|
|
},
|
|
css: {
|
|
preprocessorOptions: {
|
|
less: {
|
|
javascriptEnabled: true,
|
|
},
|
|
},
|
|
},
|
|
optimizeDeps: {
|
|
include: [
|
|
"react",
|
|
"react-dom",
|
|
"react-router-dom",
|
|
"antd",
|
|
"@ant-design/icons",
|
|
"zustand",
|
|
"@tanstack/react-query",
|
|
"axios",
|
|
],
|
|
},
|
|
})
|