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:
@@ -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, "");
|
||||
|
||||
Reference in New Issue
Block a user