Skip to content

Commit ddf6066

Browse files
committed
fixed index for entry points
1 parent 407d1bc commit ddf6066

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/Compilation.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,13 @@ Compilation.prototype.seal = function seal(callback) {
491491
chunk.initial = chunk.entry = true;
492492
chunk.addModule(module);
493493
module.addChunk(chunk);
494+
if(typeof module.index !== "number") {
495+
module.index = this.nextFreeModuleIndex++;
496+
}
494497
this.processDependenciesBlockForChunk(module, chunk);
498+
if(typeof module.index2 !== "number") {
499+
module.index2 = this.nextFreeModuleIndex2++;
500+
}
495501
}, this);
496502
this.sortModules(this.modules);
497503
this.applyPlugins("optimize");

0 commit comments

Comments
 (0)