2026-03-22 02:57:49 +08:00
|
|
|
import path from "node:path";
|
2026-03-25 09:27:12 +08:00
|
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
|
|
|
import react from "@vitejs/plugin-react";
|
|
|
|
|
import { defineConfig } from "vite";
|
2026-03-22 02:57:49 +08:00
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [react(), tailwindcss()],
|
|
|
|
|
resolve: {
|
|
|
|
|
alias: {
|
|
|
|
|
"@": path.resolve(__dirname, "./src"),
|
|
|
|
|
},
|
2026-03-22 03:03:07 +08:00
|
|
|
dedupe: ["react", "react-dom"],
|
2026-03-22 02:57:49 +08:00
|
|
|
},
|
|
|
|
|
server: {
|
2026-04-24 01:24:15 +08:00
|
|
|
port: Number(process.env.PORT) || 1349,
|
2026-03-22 02:57:49 +08:00
|
|
|
proxy: {
|
2026-04-24 01:24:15 +08:00
|
|
|
"/api": process.env.VITE_API_URL || "http://localhost:13490",
|
2026-03-22 02:57:49 +08:00
|
|
|
},
|
|
|
|
|
},
|
2026-04-15 18:13:23 +08:00
|
|
|
build: {
|
|
|
|
|
rollupOptions: {},
|
|
|
|
|
},
|
2026-03-22 02:57:49 +08:00
|
|
|
});
|