We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7305593 commit 9e60f2cCopy full SHA for 9e60f2c
1 file changed
lib/Chunk.js
@@ -298,8 +298,16 @@ class Chunk {
298
return false;
299
}
300
301
- const modulesSize = this.modulesSize() + otherChunk.modulesSize();
302
- return this.addMultiplierAndOverhead(modulesSize, options);
+ let integratedModulesSize = this.modulesSize();
+ // only count modules that do not exist in this chunk!
303
+ for(let i = 0; i < otherChunk.modules.length; i++) {
304
+ const otherModule = otherChunk.modules[i];
305
+ if(this.modules.indexOf(otherModule) === -1) {
306
+ integratedModulesSize += otherModule.size();
307
+ }
308
309
+
310
+ return this.addMultiplierAndOverhead(integratedModulesSize, options);
311
312
313
getChunkMaps(includeEntries, realHash) {
0 commit comments