Rocky_Mountain_Vending/.pnpm-store/v10/files/e1/15c36160912a30598197c5c633b9b368fd53dcbd6ab2bb9a3a81bf2a8debfdba24b6a046473e846296b3f02a8b974b0d4fb3e4b674355a93a5859a3bd81a06
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

22 lines
No EOL
1.1 KiB
Text

import { getLayoutOrPageModule } from '../lib/app-dir-module';
import { parseLoaderTree } from '../../shared/lib/router/utils/parse-loader-tree';
export async function anySegmentHasRuntimePrefetchEnabled(tree) {
const { mod: layoutOrPageMod } = await getLayoutOrPageModule(tree);
// TODO(restart-on-cache-miss): Does this work correctly for client page/layout modules?
const prefetchConfig = layoutOrPageMod ? layoutOrPageMod.unstable_prefetch : undefined;
/** Whether this segment should use a runtime prefetch instead of a static prefetch. */ const hasRuntimePrefetch = (prefetchConfig == null ? void 0 : prefetchConfig.mode) === 'runtime';
if (hasRuntimePrefetch) {
return true;
}
const { parallelRoutes } = parseLoaderTree(tree);
for(const parallelRouteKey in parallelRoutes){
const parallelRoute = parallelRoutes[parallelRouteKey];
const hasChildRuntimePrefetch = await anySegmentHasRuntimePrefetchEnabled(parallelRoute);
if (hasChildRuntimePrefetch) {
return true;
}
}
return false;
}
//# sourceMappingURL=staged-validation.js.map