| | |
| | | /** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */ |
| | | |
| | | /** |
| | | * Defines the sync hook type used by this module. |
| | | * @template T |
| | | * @typedef {import("tapable").SyncHook<T>} SyncHook |
| | | */ |
| | |
| | | |
| | | class CacheEntry { |
| | | /** |
| | | * Creates an instance of CacheEntry. |
| | | * @param {ResolveRequest} result result |
| | | * @param {Snapshot} snapshot snapshot |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Serializes this instance into the provided serializer context. |
| | | * @param {ObjectSerializerContext} context context |
| | | */ |
| | | serialize({ write }) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Restores this instance from the provided deserializer context. |
| | | * @param {ObjectDeserializerContext} context context |
| | | */ |
| | | deserialize({ read }) { |
| | |
| | | makeSerializable(CacheEntry, "webpack/lib/cache/ResolverCachePlugin"); |
| | | |
| | | /** |
| | | * Adds the provided set to the cache entry. |
| | | * @template T |
| | | * @param {Set<T> | LazySet<T>} set set to add items to |
| | | * @param {Set<T> | LazySet<T> | Iterable<T>} otherSet set to add items from |
| | |
| | | }; |
| | | |
| | | /** |
| | | * Returns stringified version. |
| | | * @template {object} T |
| | | * @param {T} object an object |
| | | * @param {boolean} excludeContext if true, context is not included in string |
| | |
| | | |
| | | class ResolverCachePlugin { |
| | | /** |
| | | * Apply the plugin |
| | | * Applies the plugin by registering its hooks on the compiler. |
| | | * @param {Compiler} compiler the compiler instance |
| | | * @returns {void} |
| | | */ |
| | |
| | | /** @typedef {ResolveRequest & { _ResolverCachePluginCacheMiss: true }} ResolveRequestWithCacheMiss */ |
| | | |
| | | /** |
| | | * Processes the provided item cache. |
| | | * @param {ItemCacheFacade} itemCache cache |
| | | * @param {Resolver} resolver the resolver |
| | | * @param {ResolveContext} resolveContext context for resolving meta info |
| | |
| | | (yieldResult).push(obj); |
| | | } |
| | | /** |
| | | * Processes the provided key. |
| | | * @param {"fileDependencies" | "contextDependencies" | "missingDependencies"} key key |
| | | */ |
| | | const propagate = (key) => { |
| | |
| | | } |
| | | }; |
| | | /** |
| | | * Process cache result. |
| | | * @param {(Error | null)=} err error if any |
| | | * @param {(CacheEntry | null)=} cacheEntry cache entry |
| | | * @returns {void} |