From 5088e0f4ae1193031ab19e5d43a1083f0de99d19 Mon Sep 17 00:00:00 2001 From: Alireza Hassani Date: Fri, 24 Jul 2026 17:29:30 +0330 Subject: [PATCH] Support configurable Vite base for admin path or subdomain deploys. Co-authored-by: Cursor --- apps/admin/src/App.tsx | 2 +- apps/admin/vite.config.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/admin/src/App.tsx b/apps/admin/src/App.tsx index 842b0c4..f3332d9 100644 --- a/apps/admin/src/App.tsx +++ b/apps/admin/src/App.tsx @@ -12,7 +12,7 @@ import { ReportagePage } from "./pages/ReportagePage"; export default function App() { return ( - + } /> diff --git a/apps/admin/vite.config.ts b/apps/admin/vite.config.ts index 74abf53..26a4c22 100644 --- a/apps/admin/vite.config.ts +++ b/apps/admin/vite.config.ts @@ -3,6 +3,9 @@ import react from "@vitejs/plugin-react"; export default defineConfig({ plugins: [react()], + // Production one-VM path deploy: VITE_BASE=/admin/ + // Subdomain deploy can omit this (defaults to /). + base: process.env.VITE_BASE ?? "/", server: { host: "127.0.0.1", port: 5173,