Home / Function/ resolvePathAlias() — drizzle-orm Function Reference

resolvePathAlias() — drizzle-orm Function Reference

Architecture documentation for the resolvePathAlias() function in fix-imports.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  e245a77f_66a9_0a53_ba2c_9875ca210e00["resolvePathAlias()"]
  f8e97c50_cfe8_108a_dbb6_73828c892bc9["fix-imports.ts"]
  e245a77f_66a9_0a53_ba2c_9875ca210e00 -->|defined in| f8e97c50_cfe8_108a_dbb6_73828c892bc9
  a3240399_f77a_77a7_1e23_52bf3a858ac0["fixImportPath()"]
  a3240399_f77a_77a7_1e23_52bf3a858ac0 -->|calls| e245a77f_66a9_0a53_ba2c_9875ca210e00
  style e245a77f_66a9_0a53_ba2c_9875ca210e00 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-typebox/scripts/fix-imports.ts lines 8–15

function resolvePathAlias(importPath: string, file: string) {
	if (importPath.startsWith('~/')) {
		const relativePath = path.relative(path.dirname(file), path.resolve('dist.new', importPath.slice(2)));
		importPath = relativePath.startsWith('.') ? relativePath : './' + relativePath;
	}

	return importPath;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does resolvePathAlias() do?
resolvePathAlias() is a function in the drizzle-orm codebase, defined in drizzle-typebox/scripts/fix-imports.ts.
Where is resolvePathAlias() defined?
resolvePathAlias() is defined in drizzle-typebox/scripts/fix-imports.ts at line 8.
What calls resolvePathAlias()?
resolvePathAlias() is called by 1 function(s): fixImportPath.

Analyze Your Own Codebase

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

Try Supermodel Free