On this page

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

  • directories {Set} list of directories
  • files {Set} list of files
  • missing {Set} list of missing entries
  • resolveDependencies <ResolveDependencies> dependencies of the resolving
  • resolveResults {Map<string, string|false|undefined>} stored resolve results

  • contextDependencies {WriteOnlySet} directories that was found on file system
  • fileDependencies {WriteOnlySet} files that was found on file system
  • log <object> log function
  • missingDependencies {WriteOnlySet} dependencies that was not found on file system
  • stack {Set} set of hooks' calls. For instance, resolve → parsedResolve → describedResolve,
  • yield <object> yield result, if provided plugins can return several results


Attributes
safeTime:<number>
timestampHash:<string>

Attributes
safeTime:<number>
timestampHash:<string>

  • directories {Set} list of directories
  • files {Set} list of files
  • missing {Set} list of missing entries

  • platform {false|PlatformTargetProperties} - platform target properties

Options object for resolving requests.

Attributes
Redirect module requests.
aliasFields:<string>
Fields in the description file (usually package.json) which are used to redirect requests inside the module.
byDependency:<object>
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:<object>
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:<object>
An object which maps extension to extension aliases.
extensions:<string[]>
Extensions added to the request when trying to find the file.
fallback:<object[]> | <object>
Redirect module requests when normal resolving fails.
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>
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 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.
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.
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> | <object>
Enable caching of successfully resolved requests (cache entries are not revalidated).
useSyncFileSystemCalls:<boolean>
Use synchronous filesystem calls for the resolver.

  • alias {AliasOption[]} alias
  • aliasFields {Set<string|string[]>} alias fields
  • cachePredicate <object> cache predicate
  • cacheWithContext <boolean> cache with context
  • conditionNames {Set} 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
  • extensions {Set} extensions
  • fallback {AliasOption[]} fallback
  • fileSystem <FileSystem> fileSystem
  • fullySpecified <boolean> fully specified
  • importsFields {Set<string|string[]>} imports fields
  • mainFields <object[]> main fields
  • mainFiles {Set} main files
  • modules <string> modules
  • plugins <Plugin[]> plugins
  • 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} roots
  • symlinks <boolean> symlinks
  • tsconfig <string> | <boolean> | <TsconfigOptions> tsconfig file path or config object
  • unsafeCache <CacheTypes> unsafe cache

Attributes
A list of module alias configurations or an object which maps key to value
aliasFields:<string>
A list of alias fields in description files
cachePredicate:<object>
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>
A list of exports fields in description files
An object which maps extension to extension aliases
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>
A list of imports fields in description files
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 or folder name
plugins:<Plugin[]>
A list of additional resolve plugins which should be applied
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
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

<object>

  • [index: {string}] <any>

  • apply <object> The run point of the plugin, required method.


<object>


Type:
{BaseResolveRequest|Partial }