latest code

This commit is contained in:
2026-09-08 10:50:13 +05:30
commit 86a06d819f
374 changed files with 98701 additions and 0 deletions
+81
View File
@@ -0,0 +1,81 @@
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
const apiUrl = env.VITE_API_BASE_URL || "http://localhost:20001/api";
const apiTarget = apiUrl.replace(/\/api\/?$/, "");
const wsTarget = apiTarget.replace(/^http/, "ws");
return {
plugins: [react()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
optimizeDeps: {
exclude: ["lucide-react"],
},
server: {
port: 5174,
allowedHosts: true,
proxy: {
/*
--------------------------------
YOUR APPLICATION BACKEND
--------------------------------
*/
"/api/saas": {
target: env.VITE_SAAS_API_URL || "http://localhost:8000",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/saas/, "/api"),
},
"/api": {
target: apiTarget,
changeOrigin: true,
},
"/socket.io": {
target: apiTarget,
ws: true,
changeOrigin: true,
},
"/socket": {
target: wsTarget,
ws: true,
changeOrigin: true,
},
},
},
build: {
rollupOptions: {
output: {
manualChunks: {
"vendor-react": ["react", "react-dom", "react-router-dom"],
},
},
},
chunkSizeWarningLimit: 900,
},
};
});