fix:优化项目内容

This commit is contained in:
Daniel
2026-03-18 17:01:10 +08:00
parent da63282a10
commit 27dc89e251
64 changed files with 3421 additions and 4982 deletions

View File

@@ -0,0 +1,35 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
server: {
port: 3000,
strictPort: true,
proxy: {
"/api": {
target: process.env.VITE_DEV_PROXY_TARGET ?? "http://localhost:8000",
changeOrigin: true,
secure: false,
// dev 对齐生产 Nginx/api/* -> backend /*
rewrite: (p) => p.replace(/^\/api/, ""),
},
"/data": {
target: process.env.VITE_DEV_PROXY_TARGET ?? "http://localhost:8000",
changeOrigin: true,
secure: false,
},
},
},
build: {
outDir: "dist",
sourcemap: true,
},
});