Home / Function/ load() — tailwindcss Function Reference

load() — tailwindcss Function Reference

Architecture documentation for the load() function in stylesheet.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  cfe5faf0_6df4_9cfd_d25c_1dcf672e58ea["load()"]
  b9897393_3e36_7806_d172_b9debcd215f6["Stylesheet"]
  cfe5faf0_6df4_9cfd_d25c_1dcf672e58ea -->|defined in| b9897393_3e36_7806_d172_b9debcd215f6
  817bb61a_7ad0_1186_790a_6a40126eed80["run()"]
  817bb61a_7ad0_1186_790a_6a40126eed80 -->|calls| cfe5faf0_6df4_9cfd_d25c_1dcf672e58ea
  style cfe5faf0_6df4_9cfd_d25c_1dcf672e58ea fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-upgrade/src/stylesheet.ts lines 69–76

  static async load(filepath: string) {
    filepath = path.resolve(process.cwd(), filepath)

    let css = await fs.readFile(filepath, 'utf-8')
    let root = postcss.parse(css, { from: filepath })

    return new Stylesheet(root, filepath)
  }

Subdomains

Called By

Frequently Asked Questions

What does load() do?
load() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-upgrade/src/stylesheet.ts.
Where is load() defined?
load() is defined in packages/@tailwindcss-upgrade/src/stylesheet.ts at line 69.
What calls load()?
load() is called by 1 function(s): run.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free