mirror of https://github.com/webpack/webpack.git
reduce calls to getter
This commit is contained in:
parent
0397701d85
commit
4c1ad1ee7d
|
|
@ -1149,10 +1149,11 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
||||||
// Here webpack is using heuristic that assumes
|
// Here webpack is using heuristic that assumes
|
||||||
// mostly esm dependencies would be used
|
// mostly esm dependencies would be used
|
||||||
// so we don't allocate extra string for them
|
// so we don't allocate extra string for them
|
||||||
|
const category = dep.category;
|
||||||
const cacheKey =
|
const cacheKey =
|
||||||
dep.category === esmDependencyCategory
|
category === esmDependencyCategory
|
||||||
? resourceIdent
|
? resourceIdent
|
||||||
: `${dep.category}${resourceIdent}`;
|
: `${category}${resourceIdent}`;
|
||||||
const constructor = dep.constructor;
|
const constructor = dep.constructor;
|
||||||
let innerMap;
|
let innerMap;
|
||||||
let factory;
|
let factory;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue