Home / Function/ normalizePath() — tailwindcss Function Reference

normalizePath() — tailwindcss Function Reference

Architecture documentation for the normalizePath() function in normalize-path.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  fafe253f_5b0a_82ac_9823_6d2c3e638dbd["normalizePath()"]
  ef1f735b_b130_6631_a9cc_e465ace5e479["rewriteUrls()"]
  ef1f735b_b130_6631_a9cc_e465ace5e479 -->|calls| fafe253f_5b0a_82ac_9823_6d2c3e638dbd
  83dc9d6e_6632_c926_0c80_4208283dda7e["relativeToStylesheet()"]
  83dc9d6e_6632_c926_0c80_4208283dda7e -->|calls| fafe253f_5b0a_82ac_9823_6d2c3e638dbd
  71103892_16d8_ab76_b988_676d687093c4["normalizePathBase()"]
  fafe253f_5b0a_82ac_9823_6d2c3e638dbd -->|calls| 71103892_16d8_ab76_b988_676d687093c4
  style fafe253f_5b0a_82ac_9823_6d2c3e638dbd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-node/src/normalize-path.ts lines 33–47

export function normalizePath(originalPath: string) {
  let normalized = normalizePathBase(originalPath)

  // Make sure Windows network share paths are normalized properly
  // They have to begin with two slashes or they won't resolve correctly
  if (
    originalPath.startsWith('\\\\') &&
    normalized.startsWith('/') &&
    !normalized.startsWith('//')
  ) {
    return `/${normalized}`
  }

  return normalized
}

Subdomains

Frequently Asked Questions

What does normalizePath() do?
normalizePath() is a function in the tailwindcss codebase.
What does normalizePath() call?
normalizePath() calls 1 function(s): normalizePathBase.
What calls normalizePath()?
normalizePath() is called by 2 function(s): relativeToStylesheet, rewriteUrls.

Analyze Your Own Codebase

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

Try Supermodel Free