Skip to content
Permalink
Browse files
fix #9424
remove unused code
  • Loading branch information
sokra committed Jul 17, 2019
1 parent 95d21bb commit 1f966eb9d073b9233ddd6b70fa8673111652a85f
Showing 1 changed file with 3 additions and 3 deletions.
@@ -10,6 +10,8 @@ const { cachedCleverMerge } = require("./util/cleverMerge");

/** @typedef {import("enhanced-resolve").Resolver} Resolver */

const EMTPY_RESOLVE_OPTIONS = {};

module.exports = class ResolverFactory extends Tapable {
constructor() {
super();
@@ -40,13 +42,11 @@ module.exports = class ResolverFactory extends Tapable {
return true;
}
});
this.cache1 = new WeakMap();
this.cache2 = new Map();
}

get(type, resolveOptions) {
const cachedResolver = this.cache1.get(resolveOptions);
if (cachedResolver) return cachedResolver();
resolveOptions = resolveOptions || EMTPY_RESOLVE_OPTIONS;
const ident = `${type}|${JSON.stringify(resolveOptions)}`;
const resolver = this.cache2.get(ident);
if (resolver) return resolver;

0 comments on commit 1f966eb

Please sign in to comment.