1
0

refactor: 迁移 Bun fullstack 架构

This commit is contained in:
2026-05-14 00:23:37 +08:00
parent bcfac52112
commit 6e485cc991
36 changed files with 403 additions and 1081 deletions

View File

@@ -1,36 +0,0 @@
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
const backendPort = Number(process.env["BACKEND_PORT"] ?? process.env["PORT"] ?? 3000);
export default defineConfig({
build: {
assetsDir: "assets",
emptyOutDir: true,
outDir: "../../dist/web",
rolldownOptions: {
output: {
codeSplitting: {
groups: [
{ name: "vendor-react", test: /node_modules\/(react|react-dom|scheduler)/ },
{ name: "vendor-tdesign", test: /node_modules\/tdesign/ },
{ name: "vendor-chart", test: /node_modules\/(recharts|d3-)/ },
],
},
},
},
},
plugins: [react()],
root: "src/web",
server: {
host: "127.0.0.1",
port: 5173,
proxy: {
"/api": {
changeOrigin: true,
target: `http://127.0.0.1:${backendPort}`,
},
},
strictPort: true,
},
});