loadStylesheet() — tailwindcss Function Reference
Architecture documentation for the loadStylesheet() function in compile.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 4082819e_517a_9967_5eb7_0e9eda6bebdd["loadStylesheet()"] 69d3ce9e_56db_8f40_5261_64f91b0dee31["compile.ts"] 4082819e_517a_9967_5eb7_0e9eda6bebdd -->|defined in| 69d3ce9e_56db_8f40_5261_64f91b0dee31 39d7b158_3ac5_7dc8_f294_3849e86a7bc5["createCompileOptions()"] 39d7b158_3ac5_7dc8_f294_3849e86a7bc5 -->|calls| 4082819e_517a_9967_5eb7_0e9eda6bebdd b7e9a1ed_cc0d_c436_1155_d872ad96268f["__unstable__loadDesignSystem()"] b7e9a1ed_cc0d_c436_1155_d872ad96268f -->|calls| 4082819e_517a_9967_5eb7_0e9eda6bebdd 7986f564_3add_b57e_7811_fe0dac300eeb["resolveCssId()"] 4082819e_517a_9967_5eb7_0e9eda6bebdd -->|calls| 7986f564_3add_b57e_7811_fe0dac300eeb style 4082819e_517a_9967_5eb7_0e9eda6bebdd 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
Defined In
Calls
Source
Frequently Asked Questions
What does loadStylesheet() do?
loadStylesheet() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-node/src/compile.ts.
Where is loadStylesheet() defined?
loadStylesheet() is defined in packages/@tailwindcss-node/src/compile.ts at line 158.
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