Home / Function/ pathUrl() — astro Function Reference

pathUrl() — astro Function Reference

Architecture documentation for the pathUrl() function in index.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  e2b0cf58_93cf_9188_9350_a4b5816b7b4f["pathUrl()"]
  cb9f7e72_0a2c_f337_8c0f_3a16cbafeab3["experimental_AstroContainer"]
  e2b0cf58_93cf_9188_9350_a4b5816b7b4f -->|defined in| cb9f7e72_0a2c_f337_8c0f_3a16cbafeab3
  style e2b0cf58_93cf_9188_9350_a4b5816b7b4f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/container/index.ts lines 441–464

	#insertRoute({
		path,
		componentInstance,
		params = {},
		type = 'page',
	}: {
		path: string;
		componentInstance: ComponentInstance;
		route?: string;
		params?: Record<string, string | undefined>;
		type?: RouteType;
	}): RouteData {
		const pathUrl = new URL(path, 'https://example.com');
		const routeData: RouteData = this.#createRoute(pathUrl, params, type);
		this.#pipeline.manifest.routes.push({
			routeData,
			file: '',
			links: [],
			styles: [],
			scripts: [],
		});
		this.#pipeline.insertRoute(routeData, componentInstance);
		return routeData;
	}

Domain

Subdomains

Frequently Asked Questions

What does pathUrl() do?
pathUrl() is a function in the astro codebase, defined in packages/astro/src/container/index.ts.
Where is pathUrl() defined?
pathUrl() is defined in packages/astro/src/container/index.ts at line 441.

Analyze Your Own Codebase

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

Try Supermodel Free