8935196fcd
Deploy / Staging E2E Tests (push) Has been skipped
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 138h4m33s
CI/CD Pipeline / Frontend Lint (push) Failing after 138h4m39s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 138h4m39s
73 lines
1.4 KiB
TypeScript
73 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: {
|
|
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",
|
|
],
|
|
},
|
|
});
|