Home / Function/ preloadAndSetPrerenderStatus() — astro Function Reference

preloadAndSetPrerenderStatus() — astro Function Reference

Architecture documentation for the preloadAndSetPrerenderStatus() function in routing.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  264d40dd_7e50_bd38_ce03_ad26664a3078["preloadAndSetPrerenderStatus()"]
  023064dd_a580_49f4_740a_68db4b2f69c1["routing.ts"]
  264d40dd_7e50_bd38_ce03_ad26664a3078 -->|defined in| 023064dd_a580_49f4_740a_68db4b2f69c1
  f5d4b81a_de56_4781_49ee_e9bffe7908a3["getSortedPreloadedMatches()"]
  f5d4b81a_de56_4781_49ee_e9bffe7908a3 -->|calls| 264d40dd_7e50_bd38_ce03_ad26664a3078
  style 264d40dd_7e50_bd38_ce03_ad26664a3078 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/prerender/routing.ts lines 36–54

function preloadAndSetPrerenderStatus({
	matches,
	manifest,
}: PreloadAndSetPrerenderStatusParams): PreloadAndSetPrerenderStatusResult[] {
	const preloaded = new Array<PreloadAndSetPrerenderStatusResult>();
	for (const route of matches) {
		const filePath = new URL(`./${route.component}`, manifest.rootDir);
		if (routeIsRedirect(route)) {
			preloaded.push({
				route,
				filePath,
			});
			continue;
		}

		preloaded.push({ route, filePath });
	}
	return preloaded;
}

Domain

Subdomains

Frequently Asked Questions

What does preloadAndSetPrerenderStatus() do?
preloadAndSetPrerenderStatus() is a function in the astro codebase, defined in packages/astro/src/prerender/routing.ts.
Where is preloadAndSetPrerenderStatus() defined?
preloadAndSetPrerenderStatus() is defined in packages/astro/src/prerender/routing.ts at line 36.
What calls preloadAndSetPrerenderStatus()?
preloadAndSetPrerenderStatus() is called by 1 function(s): getSortedPreloadedMatches.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free