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
  06f53484_2999_b284_36a5_ac22727e6e81["resolvePathAlias()"]
  c45688c2_fd9e_4aee_4c14_289358d104b7["fix-imports.ts"]
  06f53484_2999_b284_36a5_ac22727e6e81 -->|defined in| c45688c2_fd9e_4aee_4c14_289358d104b7
  77d85c4c_bf3d_83d1_6ee1_a43a039b26c6["fixImportPath()"]
  77d85c4c_bf3d_83d1_6ee1_a43a039b26c6 -->|calls| 06f53484_2999_b284_36a5_ac22727e6e81
  style 06f53484_2999_b284_36a5_ac22727e6e81 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

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