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
  aacb75ae_cb21_6cc8_1f27_e41d2ffa4c34["migratePrefixValue()"]
  d13948d4_4434_bf78_9916_1ba327123c94["migrate-prefix.ts"]
  aacb75ae_cb21_6cc8_1f27_e41d2ffa4c34 -->|defined in| d13948d4_4434_bf78_9916_1ba327123c94
  9faa4462_1a05_6046_b23a_09ba561cb528["prepareConfig()"]
  9faa4462_1a05_6046_b23a_09ba561cb528 -->|calls| aacb75ae_cb21_6cc8_1f27_e41d2ffa4c34
  style aacb75ae_cb21_6cc8_1f27_e41d2ffa4c34 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