Home / Function/ migratePrefixValue() — tailwindcss Function Reference

migratePrefixValue() — tailwindcss Function Reference

Architecture documentation for the migratePrefixValue() function in migrate-prefix.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  137edc0b_e9b1_6852_6d97_d3956c8deba4["migratePrefixValue()"]
  e4e5ac2c_0d58_689d_0ad6_7086823787f1["migrate-prefix.ts"]
  137edc0b_e9b1_6852_6d97_d3956c8deba4 -->|defined in| e4e5ac2c_0d58_689d_0ad6_7086823787f1
  3dec545a_c324_15f0_cdd3_7c9a86137145["prepareConfig()"]
  3dec545a_c324_15f0_cdd3_7c9a86137145 -->|calls| 137edc0b_e9b1_6852_6d97_d3956c8deba4
  style 137edc0b_e9b1_6852_6d97_d3956c8deba4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-upgrade/src/codemods/template/migrate-prefix.ts lines 131–140

export function migratePrefixValue(prefix: string): string {
  let result = VALID_PREFIX.exec(prefix.toLocaleLowerCase())
  if (!result) {
    console.warn(
      `The prefix "${prefix} can not be used with Tailwind CSS v4 and cannot be converted to a valid one automatically. We've updated it to "tw" for you.`,
    )
    return 'tw'
  }
  return result[0]
}

Subdomains

Called By

Frequently Asked Questions

What does migratePrefixValue() do?
migratePrefixValue() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-upgrade/src/codemods/template/migrate-prefix.ts.
Where is migratePrefixValue() defined?
migratePrefixValue() is defined in packages/@tailwindcss-upgrade/src/codemods/template/migrate-prefix.ts at line 131.
What calls migratePrefixValue()?
migratePrefixValue() is called by 1 function(s): prepareConfig.

Analyze Your Own Codebase

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

Try Supermodel Free