Skip to main content

Module resolvers

Module resolvers 

Source

Modulesยง

tests ๐Ÿ”’

Constantsยง

EXTENSIONS

Staticsยง

FILE_PATTERN
RESOLVER ๐Ÿ”’
Creates an oxc_resolver with the appropriate options for resolving import paths. Lazy static resolver instance - created once and reused for all resolution calls. This is thread-safe and avoids the overhead of creating a new resolver for each call.

Functionsยง

file_not_found_error ๐Ÿ”’
get_package_path_by_package_json ๐Ÿ”’
possible_aliased_paths ๐Ÿ”’
resolve_file_path
resolve_from_package_json ๐Ÿ”’
resolve_path
try_resolve_pnpm_path ๐Ÿ”’
Tries to find the corresponding pnpm path for a resolved node_modules path. pnpm stores packages in node_modules/.pnpm/@/node_modules/ This function checks if such a path exists and returns it if found.
try_resolve_with_extensions ๐Ÿ”’
Tries to resolve a path by checking various file extensions. Handles three cases: