Skip to content

@saflib/imports


Function: createTreeResolveImportTarget() ​

createTreeResolveImportTarget(options): (importerPath, specifier) => null | string

Resolve import specifiers to repo-relative paths using a commit tree (no FS). Handles # import maps, relative imports, and workspace package exports.

Parameters ​

ParameterType
optionsCreateTreeResolveImportTargetOptions

Returns ​

(importerPath, specifier): null | string

Parameters ​

ParameterType
importerPathstring
specifierstring

Returns ​

null | string