loadStylesheet() — tailwindcss Function Reference
Architecture documentation for the loadStylesheet() function in compile.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD a5aea4d0_1dac_50e2_ef33_dcb8fe56d71a["loadStylesheet()"] 52f67804_5329_acb6_2ee6_ce1634fdb996["createCompileOptions()"] 52f67804_5329_acb6_2ee6_ce1634fdb996 -->|calls| a5aea4d0_1dac_50e2_ef33_dcb8fe56d71a 884346d7_e979_a8f8_f76d_59714fcaf2e0["__unstable__loadDesignSystem()"] 884346d7_e979_a8f8_f76d_59714fcaf2e0 -->|calls| a5aea4d0_1dac_50e2_ef33_dcb8fe56d71a 1f8a15e8_5c92_65ac_8991_fbe81a904a3f["resolveCssId()"] a5aea4d0_1dac_50e2_ef33_dcb8fe56d71a -->|calls| 1f8a15e8_5c92_65ac_8991_fbe81a904a3f style a5aea4d0_1dac_50e2_ef33_dcb8fe56d71a 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