On this page

new ResolverFactory(): ResolverFactory
Attributes
hooks:Readonly<{ resolveOptions: HookMap<SyncWaterfallHook<[ResolveOptionsWithDependencyType], ResolveOptionsWithDependencyType>>; resolver: HookMap<SyncHook<[Resolver, ResolveOptionsResolverFactoryObject2, ResolveOptionsWithDependencyType]>> }>
get(type, resolveOptions?): ResolverWithOptions
Attributes

Returns the resolver.

Type:string | false | string[]



Attributes
A list of module alias configurations or an object which maps key to value
aliasFields:(string | string[])[]
A list of alias fields in description files
cachePredicate:(predicate: ResolveRequest) => boolean
A function which decides whether a request should be cached or not. An object is passed with at least path and request properties.
cacheWithContext:boolean
Whether or not the unsafeCache should include request context as part of the cache key.
conditionNames:string[]
A list of exports field condition names.
descriptionFiles:string[]
A list of description files to read from
enforceExtension:boolean
Enforce that a extension from extensions must be used
exportsFields:(string | string[])[]
A list of exports fields in description files
extensionAlias:ExtensionAliasOptions
An object which maps extension to extension aliases
extensionAliasForExports:boolean
Also apply extensionAlias to paths resolved through the package.json exports field. Off by default (Node.js-aligned); when enabled, matches TypeScript's behavior for packages that ship TS sources alongside compiled JS.
extensions:string[]
A list of extensions which should be tried for files
A list of module alias configurations or an object which maps key to value, applied only after modules option
fileSystem:FileSystem
The file system which should be used
fullySpecified:boolean
The request is already fully specified and no extensions or directories are resolved for it
importsFields:(string | string[])[]
A list of imports fields in description files
mainFields:(string | string[] | { forceRelative: boolean; name: string | string[] })[]
A list of main fields in description files
mainFiles:string[]
A list of main files in directories
modules:string | string[]
A list of directories to resolve modules from, can be absolute path or folder name
plugins:Plugin[]
A list of additional resolve plugins which should be applied
pnpApi:PnpApi | null
A PnP API that should be used - null is "never", undefined is "auto"
preferAbsolute:boolean
Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots
preferRelative:boolean
Prefer to resolve module requests as relative requests before falling back to modules
resolver:Resolver
A prepared Resolver to which the plugins are attached
resolveToContext:boolean
Resolve to a context instead of a file
restrictions:(string | RegExp)[]
A list of resolve restrictions
roots:string[]
A list of root paths
symlinks:boolean
Resolve symlinks to their symlinked location
TypeScript config file path or config object with configFile and references
unsafeCache:boolean | CacheTypes
Use this cache object to unsafely cache the successful requests
useSyncFileSystemCalls:boolean
Use only the sync constraints of the file system calls

Attributes