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

Relationship Graph

Source Code

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