On this page

These types are not exported by webpack, but they are available to TypeScript consumers.

Attributes
contextDependencies:WriteOnlySet<string>
directories that was found on file system
fileDependencies:WriteOnlySet<string>
files that was found on file system
log:(str: string) => void
log function
missingDependencies:WriteOnlySet<string>
dependencies that was not found on file system
tip of the resolver call stack (a singly-linked list with Set-like API). For instance, resolve → parsedResolve → describedResolve . Accepts a legacy Set<string> for back-compat with older callers; it is normalized internally without a hot-path branch.
yield:(request: ResolveRequest) => void
yield result, if provided plugins can return several results

Attributes
attributes:Record<string, string>
cacheable:boolean
allow to use the unsafe cache
context:string
contextDependencies:LazySet<string>
createData:Partial<CreateData>
dependencies:ModuleDependency[]
dependencyType:string
fileDependencies:LazySet<string>
ignoredModule:Module
missingDependencies:LazySet<string>
phase:"source" | "defer" | "evaluation"
request:string
resolveOptions:ResolveOptions

Attributes
safeTime:number
timestampHash:string

Attributes
hash:string
safeTime:number
timestampHash:string

Options object for resolving requests.

Attributes
alias:{ alias: string | false | string[]; name: string; onlyModule?: boolean }[] | { [index: string]: string | false | string[] }
Redirect module requests.
aliasFields:(string | string[])[]
Fields in the description file (usually package.json) which are used to redirect requests inside the module.
byDependency:{ [index: string]: ResolveOptions }
Extra resolve options per dependency category. Typical categories are "commonjs", "amd", "esm".
cache:boolean
Enable caching of successfully resolved requests (cache entries are revalidated).
cachePredicate:(request: ResolveRequest) => boolean
Predicate function to decide which requests should be cached.
cacheWithContext:boolean
Include the context information in the cache identifier when caching.
conditionNames:string[]
Condition names for exports field entry point.
descriptionFiles:string[]
Filenames used to find a description file (like a package.json).
enforceExtension:boolean
Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension).
exportsFields:string[]
Field names from the description file (usually package.json) which are used to provide entry points of a package.
extensionAlias:{ [index: string]: string | string[] }
An object which maps extension to extension aliases.
extensions:string[]
Extensions added to the request when trying to find the file.
fallback:{ alias: string | false | string[]; name: string; onlyModule?: boolean }[] | { [index: string]: string | false | string[] }
Redirect module requests when normal resolving fails.
fileSystem:InputFileSystem
Filesystem for the resolver.
fullySpecified:boolean
Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases).
importsFields:string[]
Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal).
mainFields:(string | string[])[]
Field names from the description file (package.json) which are used to find the default entry point.
mainFiles:string[]
Filenames used to find the default entry point if there is no description file or main field.
modules:string[]
Folder names or directory paths where to find modules.
plugins:(false | "" | 0 | "..." | { apply: (arg0: Resolver) => void; [index: string]: any } | ((this: Resolver, arg1: Resolver) => void) | null | undefined)[]
Plugins for the resolver.
preferAbsolute:boolean
Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.
preferRelative:boolean
Prefer to resolve module requests as relative request and fallback to resolving as module.
resolver:Resolver
Custom resolver.
restrictions:(string | RegExp)[]
A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met.
roots:string[]
A list of directories in which requests that are server-relative URLs (starting with '/') are resolved.
symlinks:boolean
Enable resolving symlinks to the original location.
tsconfig:string | boolean | { configFile?: string; references?: string }
TypeScript config for paths mapping. Can be false (disabled), true (use default tsconfig.json ), a string path to tsconfig.json , or an object with configFile and references options.
unsafeCache:boolean | { [index: string]: any }
Enable caching of successfully resolved requests (cache entries are not revalidated).
useSyncFileSystemCalls:boolean
Use synchronous filesystem calls for the resolver.

Type:{ apply: (arg0: Resolver) => void; [index: string]: any } | ((this: Resolver, arg1: Resolver) => void)

{ apply: (arg0: Resolver) => void; [index: string]: any }

  • [index: {string}] any

  • apply (arg0: Resolver) => void The run point of the plugin, required method.


(this: Resolver, arg1: Resolver) => void