()
| 18 | } |
| 19 | |
| 20 | function pathDerivedBasePath(): string { |
| 21 | if (typeof window === "undefined") return ""; |
| 22 | const pathname = window.location.pathname; |
| 23 | const markerIndex = pathname.indexOf(FRAMEWORK_ROUTE_PREFIX); |
| 24 | if (markerIndex <= 0) return ""; |
| 25 | return normalizeBasePath(pathname.slice(0, markerIndex)); |
| 26 | } |
| 27 | |
| 28 | export function appBasePath(): string { |
| 29 | return configuredBasePath() || pathDerivedBasePath(); |
no test coverage detected