We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30b89d0 commit 7564bdfCopy full SHA for 7564bdf
src/index.js
@@ -387,10 +387,12 @@ class MiniCssExtractPlugin {
387
// with different order this can lead to wrong order
388
// but it's not possible to create a correct order in
389
// this case. Don't share chunks if you don't like it.
390
+
391
392
const [chunkGroup] = chunk.groupsIterable;
393
if (typeof chunkGroup.getModuleIndex2 === 'function') {
394
modules.sort(
- (a, b) => chunkGroup.getModuleIndex2(a) - chunkGroup.getModuleIndex2(b)
395
+ (a, b) => (chunkGroup.getModuleIndex2(a) || 0) < (chunkGroup.getModuleIndex2(b) || 0) ? 1 : -1
396
);
397
} else {
398
// fallback for older webpack versions
0 commit comments