Files
2026-10-28 15:58:01 +01:00

13 lines
495 B
TypeScript

import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig(({ mode }) => {
// Pfad, unter dem die App ausgeliefert wird, z.B. BASE_PATH=/ue1 → https://sim.teier.net/ue1
// Absolut statt relativ, damit die Assets auch ohne abschließenden Schrägstrich gefunden werden
const pfad = (loadEnv(mode, ".", "").BASE_PATH ?? "").replace(/^\/+|\/+$/g, "");
return {
base: pfad ? `/${pfad}/` : "/",
plugins: [react()],
};
});