0fcb77b991
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Successful in 1m6s
CI Build & Deploy Pipeline / Build Staging Web Image (push) Successful in 1m49s
CI Build & Deploy Pipeline / Build Production API Image (push) Has been skipped
CI Build & Deploy Pipeline / Build Production Web Image (push) Has been skipped
CI Build & Deploy Pipeline / Build Production Worker Image (push) Has been skipped
CI Build & Deploy Pipeline / Deploy Production (push) Has been skipped
CI Build & Deploy Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 3m1s
CI/CD Pipeline / Unit Tests (push) Successful in 3m20s
CI/CD Pipeline / Integration Tests (push) Successful in 1m29s
CI Build & Deploy Pipeline / Build Staging API Image (push) Successful in 7m4s
CI Build & Deploy Pipeline / Build Staging Worker Image (push) Successful in 7m54s
CI Build & Deploy Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 45s
CI Build & Deploy Pipeline / Staging E2E Tests (push) Failing after 2m50s
CI Build & Deploy Pipeline / Staging API Integration Tests (push) Successful in 3m28s
Co-authored-by: xiaoxia <dev@xiaoxiajianji.com> Co-committed-by: xiaoxia <dev@xiaoxiajianji.com>
74 lines
1.4 KiB
TypeScript
74 lines
1.4 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"],
|
|
},
|
|
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",
|
|
],
|
|
},
|
|
})
|