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

@@ -3,12 +3,12 @@
# 📁 paths.js
Berechnet den sauberen `BASE_URL`-Pfad basierend auf `.env.production` oder
`.env.development → NEXT_PUBLIC_BASE_PATH`.
`public/config.json → basePath`.
Entfernt führende und abschließende Slashes.
## Beispiel
Wenn `NEXT_PUBLIC_BASE_PATH = "/talas5/"`, wird `BASE_URL = "/talas5"` gesetzt.
Wenn `basePath = "/talas5/"` in config.json gesetzt ist, wird `BASE_URL = "/talas5"` verwendet.
```js
const BASE_PATH = basePathRaw.replace(/^\/|\/$/g, "");