On this page

new Resolver(): Resolver
Returns:Resolver
Attributes
basename(path, suffix?): string
Attributes
path:string
suffix:string
Returns:string

dirname(path): string
Attributes
path:string
Returns:string

doResolve(hook, request, message, resolveContext, callback): void
Attributes
hook:AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest | null>
message:string | null
resolveContext:ResolveContext
callback:(err?: Error | null, result?: ResolveRequest) => void
Returns:void

ensureHook(name): AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest | null>
Attributes
name:string | AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest | null, UnsetAdditionalOptions>
Returns:AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest | null>

getHook(name): AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest | null>
Attributes
name:string | AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest | null, UnsetAdditionalOptions>
Returns:AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest | null>

isDirectory(path): boolean
Attributes
path:string
Returns:boolean

isModule(path): boolean
Attributes
path:string
Returns:boolean

isPrivate(path): boolean
Attributes
path:string
Returns:boolean

join(path, request): string
Attributes
path:string
request:string
Returns:string

normalize(path): string
Attributes
path:string
Returns:string

parse(identifier): ParsedIdentifier
Attributes
identifier:string

resolve(parent, specifier, callback): void
Attributes
parent:string | URL_url
specifier:string | URL_url
callback:(err: ErrorWithDetail | null, res?: string | false, req?: ResolveRequest) => void
Returns:void
Attributes
parent:string | URL_url
specifier:string | URL_url
resolveContext:ResolveContext
callback:(err: ErrorWithDetail | null, res?: string | false, req?: ResolveRequest) => void
Returns:void
Attributes
context:ContextTypes
parent:string | URL_url
specifier:string | URL_url
callback:(err: ErrorWithDetail | null, res?: string | false, req?: ResolveRequest) => void
Returns:void
Attributes
context:ContextTypes
parent:string | URL_url
specifier:string | URL_url
resolveContext:ResolveContext
callback:(err: ErrorWithDetail | null, res?: string | false, req?: ResolveRequest) => void
Returns:void

resolvePromise(parent, specifier, resolveContext?): void
Attributes
parent:string | URL_url
specifier:string | URL_url
resolveContext:ResolveContext
Returns:Promise<string | false>
Attributes
context:ContextTypes
parent:string | URL_url
specifier:string | URL_url
resolveContext:ResolveContext
Returns:Promise<string | false>

resolveSync(parent, specifier, resolveContext?): void
Attributes
parent:string | URL_url
specifier:string | URL_url
resolveContext:ResolveContext
Returns:string | false
Attributes
context:ContextTypes
parent:string | URL_url
specifier:string | URL_url
resolveContext:ResolveContext
Returns:string | false
noResolve(resolveRequest, error): void
Attributes
resolveRequest:ResolveRequest
error:Error
Returns:void

no resolve hook

resolve(resolveRequest, resolveContext): ResolveRequest | null
Attributes
resolveRequest:ResolveRequest
resolveContext:ResolveContext
Returns:ResolveRequest | null

resolve hook

resolveStep(asyncSeriesBailHook, resolveRequest): void
Attributes
asyncSeriesBailHook:AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest | null, UnsetAdditionalOptions>
resolveRequest:ResolveRequest
Returns:void

resolve step hook

result(resolveRequest, resolveContext): void
Attributes
resolveRequest:ResolveRequest
resolveContext:ResolveContext
Returns:void

result hook

Attributes
alias:Alias
name:string
onlyModule:boolean

Attributes
the underlying cache map
fn:(maybePath: string, suffix?: string) => string
cached dirname function

Attributes
cache:Map<string, string>
the underlying cache map
fn:(maybePath: string) => string
cached dirname function

Attributes
alias:string | string[]
extension:string

Attributes
the underlying cache map
fn:(rootPath: string, request: string) => string
cached join function

noResolve(resolveRequest, error): void
Attributes
resolveRequest:ResolveRequest
error:Error
Returns:void

no resolve hook

resolve(resolveRequest, resolveContext): ResolveRequest | null
Attributes
resolveRequest:ResolveRequest
resolveContext:ResolveContext
Returns:ResolveRequest | null

resolve hook

resolveStep(asyncSeriesBailHook, resolveRequest): void
Attributes
asyncSeriesBailHook:AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest | null, UnsetAdditionalOptions>
resolveRequest:ResolveRequest
Returns:void

resolve step hook

result(resolveRequest, resolveContext): void
Attributes
resolveRequest:ResolveRequest
resolveContext:ResolveContext
Returns:void

result hook


Attributes
cached basename
cached dirname
cached join

Attributes
alias:AliasOption[]
alias
aliasFields:Set<string | string[]>
alias fields
cachePredicate:(predicate: ResolveRequest) => boolean
cache predicate
cacheWithContext:boolean
cache with context
conditionNames:Set<string>
A list of exports field condition names.
descriptionFiles:string[]
description files
enforceExtension:boolean
enforce extension
exportsFields:Set<string | string[]>
exports fields
extensionAlias:ExtensionAliasOption[]
extension alias
extensionAliasForExports:boolean
apply extension alias to exports field targets
extensions:Set<string>
extensions
fallback:AliasOption[]
fallback
fileSystem:FileSystem
fileSystem
fullySpecified:boolean
fully specified
importsFields:Set<string | string[]>
imports fields
mainFields:{ forceRelative: boolean; name: string[] }[]
main fields
mainFiles:Set<string>
main files
modules:(string | string[])[]
modules
plugins:Plugin[]
plugins
pnpApi:PnpApi | null
pnp API
preferAbsolute:boolean
prefer absolute
preferRelative:boolean
prefer relative
resolver:Resolver
resolver
resolveToContext:boolean
resolve to context
restrictions:Set<string | RegExp>
restrictions
roots:Set<string>
roots
symlinks:boolean
symlinks
tsconfig file path or config object
unsafeCache:false | CacheTypes
unsafe cache

Attributes
baseUrl:string
Override baseUrl from tsconfig.json. If provided, this value will be used instead of the baseUrl in the tsconfig file
configFile:string
A relative path to the tsconfig file based on cwd, or an absolute path of tsconfig file
references:string[] | "auto"
References to other tsconfig files. 'auto' inherits from TypeScript config, or an array of relative/absolute paths