root() — astro Function Reference
Architecture documentation for the root() function in local.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD bb5ec2cf_dded_7bf4_8e68_8633d6261646["root()"] 214874ef_a162_c192_431e_95979e65861c["LocalFontProvider"] bb5ec2cf_dded_7bf4_8e68_8633d6261646 -->|defined in| 214874ef_a162_c192_431e_95979e65861c style bb5ec2cf_dded_7bf4_8e68_8633d6261646 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/assets/fonts/providers/local.ts lines 87–95
#resolveEntrypoint(root: URL, entrypoint: string): URL {
const require = createRequire(root);
try {
return pathToFileURL(require.resolve(entrypoint));
} catch {
return new URL(entrypoint, root);
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does root() do?
root() is a function in the astro codebase, defined in packages/astro/src/assets/fonts/providers/local.ts.
Where is root() defined?
root() is defined in packages/astro/src/assets/fonts/providers/local.ts at line 87.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free