loadStylesheet() — tailwindcss Function Reference
Architecture documentation for the loadStylesheet() function in compile.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD f5ce10d2_e1ca_17b6_3caf_b29c52fe681b["loadStylesheet()"] 2cba246e_336d_6f47_8fa4_83f35f72c847["createCompileOptions()"] 2cba246e_336d_6f47_8fa4_83f35f72c847 -->|calls| f5ce10d2_e1ca_17b6_3caf_b29c52fe681b ec24f183_c831_b663_6c85_1d33238066d6["__unstable__loadDesignSystem()"] ec24f183_c831_b663_6c85_1d33238066d6 -->|calls| f5ce10d2_e1ca_17b6_3caf_b29c52fe681b ca1faee4_ee82_06ea_7c53_3492f4b84977["resolveCssId()"] f5ce10d2_e1ca_17b6_3caf_b29c52fe681b -->|calls| ca1faee4_ee82_06ea_7c53_3492f4b84977 style f5ce10d2_e1ca_17b6_3caf_b29c52fe681b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/@tailwindcss-node/src/compile.ts lines 158–175
async function loadStylesheet(
id: string,
base: string,
onDependency: (path: string) => void,
cssResolver?: Resolver,
) {
let resolvedPath = await resolveCssId(id, base, cssResolver)
if (!resolvedPath) throw new Error(`Could not resolve '${id}' from '${base}'`)
onDependency(resolvedPath)
let file = await fsPromises.readFile(resolvedPath, 'utf-8')
return {
path: resolvedPath,
base: path.dirname(resolvedPath),
content: file,
}
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does loadStylesheet() do?
loadStylesheet() is a function in the tailwindcss codebase.
What does loadStylesheet() call?
loadStylesheet() calls 1 function(s): resolveCssId.
What calls loadStylesheet()?
loadStylesheet() is called by 2 function(s): __unstable__loadDesignSystem, createCompileOptions.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free