Skip to content

Commit

Permalink
reduce calls to getter
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Jun 17, 2020
1 parent 0397701 commit 4c1ad1e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Compilation.js
Original file line number Diff line number Diff line change
Expand Up @@ -1149,10 +1149,11 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
// Here webpack is using heuristic that assumes
// mostly esm dependencies would be used
// so we don't allocate extra string for them
const category = dep.category;
const cacheKey =
dep.category === esmDependencyCategory
category === esmDependencyCategory
? resourceIdent
: `${dep.category}${resourceIdent}`;
: `${category}${resourceIdent}`;
const constructor = dep.constructor;
let innerMap;
let factory;
Expand Down

0 comments on commit 4c1ad1e

Please sign in to comment.