Home / Function/ fileURLToNormalizedPath() — astro Function Reference

fileURLToNormalizedPath() — astro Function Reference

Architecture documentation for the fileURLToNormalizedPath() function in node.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  a76ac834_db5a_84b2_dcc7_813558f1bb72["fileURLToNormalizedPath()"]
  cb45fbc5_a108_7969_b027_ddb8eab65943["node.ts"]
  a76ac834_db5a_84b2_dcc7_813558f1bb72 -->|defined in| cb45fbc5_a108_7969_b027_ddb8eab65943
  3a4327f8_602e_101e_f3dd_6616f760fe79["emitImageMetadata()"]
  3a4327f8_602e_101e_f3dd_6616f760fe79 -->|calls| a76ac834_db5a_84b2_dcc7_813558f1bb72
  style a76ac834_db5a_84b2_dcc7_813558f1bb72 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/assets/utils/node.ts lines 141–144

function fileURLToNormalizedPath(filePath: URL): string {
	// Uses `slash` instead of Vite's `normalizePath` to avoid CJS bundling issues.
	return slash(fileURLToPath(filePath) + filePath.search).replace(/\\/g, '/');
}

Domain

Subdomains

Frequently Asked Questions

What does fileURLToNormalizedPath() do?
fileURLToNormalizedPath() is a function in the astro codebase, defined in packages/astro/src/assets/utils/node.ts.
Where is fileURLToNormalizedPath() defined?
fileURLToNormalizedPath() is defined in packages/astro/src/assets/utils/node.ts at line 141.
What calls fileURLToNormalizedPath()?
fileURLToNormalizedPath() is called by 1 function(s): emitImageMetadata.

Analyze Your Own Codebase

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

Try Supermodel Free