normalizeFilename() — astro Function Reference
Architecture documentation for the normalizeFilename() function in index.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 079b0d2e_df1d_ad68_5611_24633b980edc["normalizeFilename()"] 298bcb8b_76f4_5bc3_f13f_87978f5034c8["index.ts"] 079b0d2e_df1d_ad68_5611_24633b980edc -->|defined in| 298bcb8b_76f4_5bc3_f13f_87978f5034c8 style 079b0d2e_df1d_ad68_5611_24633b980edc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/vite-plugin-utils/index.ts lines 39–47
export function normalizeFilename(filename: string, root: URL) {
if (filename.startsWith('/@fs')) {
filename = filename.slice('/@fs'.length);
} else if (filename.startsWith('/') && !commonAncestorPath(filename, fileURLToPath(root))) {
const url = new URL('.' + filename, root);
filename = viteID(url);
}
return removeLeadingForwardSlashWindows(filename);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does normalizeFilename() do?
normalizeFilename() is a function in the astro codebase, defined in packages/astro/src/vite-plugin-utils/index.ts.
Where is normalizeFilename() defined?
normalizeFilename() is defined in packages/astro/src/vite-plugin-utils/index.ts at line 39.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free