new ResolverFactory(): ResolverFactoryReturns:
ResolverFactoryAttributes
cache:
Map<string, ResolverCache>M
get
get(type, resolveOptions?): ResolverWithOptionsAttributes
Returns the resolver.
Returns:
voidReturns:
voidAttributes
alias:
UserAliasOptions | UserAliasOptionEntry[]A list of module alias configurations or an object which maps key to value
cachePredicate:
(predicate: ResolveRequest) => booleanA function which decides whether a request should be cached or not. An object is passed with at least
path
and
request
properties.cacheWithContext:
booleanWhether 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:
booleanEnforce that a extension from extensions must be used
extensionAlias:
ExtensionAliasOptionsAn object which maps extension to extension aliases
extensionAliasForExports:
booleanAlso 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
fallback:
UserAliasOptions | UserAliasOptionEntry[]A list of module alias configurations or an object which maps key to value, applied only after modules option
fileSystem:
FileSystemThe file system which should be used
fullySpecified:
booleanThe request is already fully specified and no extensions or directories are resolved for it
A list of main fields in description files
mainFiles:
string[]A list of main files in directories
A list of directories to resolve modules from, can be absolute path, folder name, or a
file:
URL
instanceplugins:
Plugin[]A list of additional resolve plugins which should be applied
pnpApi:
PnpApi | nullA PnP API that should be used - null is "never", undefined is "auto"
preferAbsolute:
booleanPrefer to resolve server-relative urls as absolute paths before falling back to resolve in roots
preferRelative:
booleanPrefer to resolve module requests as relative requests before falling back to modules
resolver:
ResolverA prepared Resolver to which the plugins are attached
resolveToContext:
booleanResolve to a context instead of a file
A list of resolve restrictions, each an absolute path, a
file:
URL
instance, or a RegExpsymlinks:
booleanResolve symlinks to their symlinked location
tsconfig:
string | boolean | URL_url | UserTsconfigOptionsTypeScript config file path (or
file:
URL
instance) or config object with configFile and referencesunsafeCache:
boolean | CacheTypesUse this cache object to unsafely cache the successful requests
useSyncFileSystemCalls:
booleanUse only the sync constraints of the file system calls
Attributes
stringified:
Map<string, ResolverWithOptions>Attributes
[index: {string}]UserAliasOptionNewRequest
Attributes