import { buildDevStylesUrl, rootRouteId } from '@tanstack/router-core' import type { AnyRoute, ManifestAssetLink, RouterManagedTag, } from '@tanstack/router-core' import type { StartManifestWithClientEntry } from './transformAssetUrls' // Pre-computed constant for dev styles URL basepath. // Defaults to vite `base` (set via TSS_DEV_SSR_STYLES_BASEPATH in the plugin), // aligning dev styles with how other CSS/JS assets are served. const DEV_SSR_STYLES_BASEPATH = process.env.TSS_DEV_SSR_STYLES_BASEPATH || '/' /** * @description Returns the router manifest data that should be sent to the client. * This includes only the assets and preloads for the current route and any * special assets that are needed for the client. It does not include relationships * between routes or any other data that is not needed for the client. * * The client entry URL is returned separately so that it can be transformed * (e.g. for CDN rewriting) before being embedded into the `