changed dashboard

This commit is contained in:
Jelaletdin12 committed 2026-10-02 16:43:27 +05:00
1 parent 1ebc133d1c
commit cbd17608c1
13 files changed
+1125 -547

No files matched your search

+32 -19
View File
@@ -1,26 +1,39 @@
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "vite";
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
// https://vite.dev/config/
export default defineConfig({
base: "/online/",
plugins: [react()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
preview: {
allowedHosts: ["test.webulgam.com"],
},
server: {
allowedHosts: ["test.webulgam.com"],
proxy: {
"/api": {
target: "https://test.webulgam.com/online-backend",
changeOrigin: true,
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
// Public path the app is served from; the router basename is derived from it.
const base = env.VITE_BASE_PATH || "/online/";
// Backend origin the dev server proxies /api to.
const proxyTarget = env.VITE_PROXY_TARGET || "https://test.webulgam.com/online-backend";
const allowedHosts = (env.VITE_ALLOWED_HOSTS || "test.webulgam.com")
.split(",")
.map((h) => h.trim())
.filter(Boolean);
return {
base,
plugins: [react()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
},
preview: {
allowedHosts,
},
server: {
allowedHosts,
proxy: {
"/api": {
target: proxyTarget,
changeOrigin: true,
},
},
},
};
});