feat: basePath-Konfiguration von .env in config.json verschoben

basePath wird jetzt in config.json gepflegt statt als NEXT_PUBLIC_BASE_PATH in .env.*
Alle relevanten Code-Stellen lesen basePath dynamisch aus config.json
Dokumentation und Beispiele in Markdown-Dateien entsprechend angepasst
Erhöhte Flexibilität für Deployments ohne Rebuild
This commit is contained in:
ISA
2025-08-20 08:42:24 +02:00
parent bf4fc95b8e
commit 9a2b438eaf
19 changed files with 135 additions and 47 deletions

View File

@@ -35,7 +35,14 @@ export const createAndSetDevices = async (
setMarkersFunction([]);
return;
}
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || "";
let basePath = "";
try {
const res = await fetch("/config.json");
if (res.ok) {
const config = await res.json();
basePath = config.basePath || "";
}
} catch (e) {}
try {
const state = store.getState();