( basepath: string, routeIds: Array<string>, )
| 688 | * @returns The full URL path for the dev styles CSS endpoint |
| 689 | */ |
| 690 | export function buildDevStylesUrl( |
| 691 | basepath: string, |
| 692 | routeIds: Array<string>, |
| 693 | ): string { |
| 694 | // Trim all leading and trailing slashes from basepath |
| 695 | const trimmedBasepath = basepath.replace(/^\/+|\/+$/g, '') |
| 696 | // Build normalized basepath: empty string for root, or '/path' for non-root |
| 697 | const normalizedBasepath = trimmedBasepath === '' ? '' : `/${trimmedBasepath}` |
| 698 | return `${normalizedBasepath}/@tanstack-start/styles.css?routes=${encodeURIComponent(routeIds.join(','))}` |
| 699 | } |
no test coverage detected