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
  51d49a57_d5c1_fa32_a589_5ef1d6cacb27["resolvePathAlias()"]
  2f5e9e14_c063_bf83_8ef1_37a740ee091a["fix-imports.ts"]
  51d49a57_d5c1_fa32_a589_5ef1d6cacb27 -->|defined in| 2f5e9e14_c063_bf83_8ef1_37a740ee091a
  c122d189_eed9_1fb3_b78f_067bf5f5c933["fixImportPath()"]
  c122d189_eed9_1fb3_b78f_067bf5f5c933 -->|calls| 51d49a57_d5c1_fa32_a589_5ef1d6cacb27
  style 51d49a57_d5c1_fa32_a589_5ef1d6cacb27 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-zod/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-zod/scripts/fix-imports.ts.
Where is resolvePathAlias() defined?
resolvePathAlias() is defined in drizzle-zod/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