Skip to content

Commit a4a7260

Browse files
committed
throw Error when multiple chunks emit to the same filename
1 parent 63eff24 commit a4a7260

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎lib/Compilation.js‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -790,11 +790,12 @@ Compilation.prototype.createChunkAssets = function createChunkAssets() {
790790
}
791791
}
792792
}
793-
this.assets[
794-
file = this.getPath(filenameTemplate, {
795-
chunk: chunk
796-
})
797-
] = source;
793+
file = this.getPath(filenameTemplate, {
794+
chunk: chunk
795+
});
796+
if(this.assets[file])
797+
throw new Error("Conflict: Multiple assets emit to the same filename '" + file + "'");
798+
this.assets[file] = source;
798799
chunk.files.push(file);
799800
this.applyPlugins("chunk-asset", chunk, file);
800801
}

0 commit comments

Comments
 (0)