mirror of https://github.com/webpack/webpack.git
fix: order of chunks ids in generated chunk code
This commit is contained in:
commit
152cb00181
|
@ -5,6 +5,8 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { compareIds } = require("../util/comparators");
|
||||
|
||||
/** @typedef {import("../Chunk")} Chunk */
|
||||
/** @typedef {import("../Chunk").ChunkId} ChunkId */
|
||||
/** @typedef {import("../Compiler")} Compiler */
|
||||
|
@ -112,8 +114,12 @@ class FlagIncludedChunksPlugin {
|
|||
for (const m of chunkGraph.getChunkModulesIterable(chunkA)) {
|
||||
if (!chunkGraph.isModuleInChunk(m, chunkB)) continue loopB;
|
||||
}
|
||||
|
||||
/** @type {ChunkId[]} */
|
||||
(chunkB.ids).push(/** @type {ChunkId} */ (chunkA.id));
|
||||
// https://github.com/webpack/webpack/issues/18837
|
||||
/** @type {ChunkId[]} */
|
||||
(chunkB.ids).sort(compareIds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue