mirror of https://github.com/webpack/webpack.git
Merge pull request #6943 from webpack/bugfix/sort-children-for-hash
sort child compilations for consitent hash
This commit is contained in:
commit
3f33d88860
|
|
@ -62,6 +62,14 @@ const byIndexOrIdentifier = (a, b) => {
|
|||
return 0;
|
||||
};
|
||||
|
||||
const byNameOrHash = (a, b) => {
|
||||
if (a.name < b.name) return -1;
|
||||
if (a.name > b.name) return 1;
|
||||
if (a.fullHash < b.fullHash) return -1;
|
||||
if (a.fullhash > b.fullHash) return 1;
|
||||
return 0;
|
||||
};
|
||||
|
||||
const iterationBlockVariable = (variables, fn) => {
|
||||
for (
|
||||
let indexVariable = 0;
|
||||
|
|
@ -1594,6 +1602,7 @@ class Compilation extends Tapable {
|
|||
|
||||
this.errors.sort(byMessage);
|
||||
this.warnings.sort(byMessage);
|
||||
this.children.sort(byNameOrHash);
|
||||
}
|
||||
|
||||
summarizeDependencies() {
|
||||
|
|
@ -1678,7 +1687,7 @@ class Compilation extends Tapable {
|
|||
const bEntry = b.hasRuntime();
|
||||
if (aEntry && !bEntry) return 1;
|
||||
if (!aEntry && bEntry) return -1;
|
||||
return 0;
|
||||
return byId(a, b);
|
||||
});
|
||||
for (let i = 0; i < chunks.length; i++) {
|
||||
const chunk = chunks[i];
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Hash: ca712e9bc95207b9082e
|
||||
Hash: 7a73868d9be286944b0a
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
|
|||
Loading…
Reference in New Issue