GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix unstable sorting of ChunkGroups and add test · webpack/webpack@8e2e19b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • Chunk.js
    • ChunkGroup.js
  • test/statsCases/prefetch-preload-mixed
    • expected.txt
    • index.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/Chunk.js‎

Copy file name to clipboardExpand all lines: lib/Chunk.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ class Chunk {
389389
const cmp = b.order - a.order;
390390
if (cmp !== 0) return cmp;
391391
// TOOD webpack 5 remove this check of compareTo
392-
if (a.compareTo) return a.compareTo(b);
392+
if (a.group.compareTo) return a.group.compareTo(b.group);
393393
return 0;
394394
});
395395
result[name] = Array.from(
Collapse file

‎lib/ChunkGroup.js‎

Copy file name to clipboardExpand all lines: lib/ChunkGroup.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ class ChunkGroup {
349349
const cmp = b.order - a.order;
350350
if (cmp !== 0) return cmp;
351351
// TOOD webpack 5 remove this check of compareTo
352-
if (a.compareTo) return a.compareTo(b);
352+
if (a.group.compareTo) return a.group.compareTo(b.group);
353353
return 0;
354354
});
355355
result[name] = list.map(i => i.group);
Collapse file

‎test/statsCases/prefetch-preload-mixed/expected.txt‎

Copy file name to clipboardExpand all lines: test/statsCases/prefetch-preload-mixed/expected.txt
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
chunk {0} a.js (a) 136 bytes <{3}> >{10}< >{9}< (prefetch: {10} {9}) [rendered]
1+
chunk {0} a.js (a) 136 bytes <{3}> >{10}< >{9}< (prefetch: {9} {10}) [rendered]
22
chunk {1} b.js (b) 203 bytes <{3}> >{6}< >{7}< >{8}< (prefetch: {6} {8}) (preload: {7}) [rendered]
33
chunk {2} c.js (c) 134 bytes <{3}> >{4}< >{5}< (preload: {4} {5}) [rendered]
4-
chunk {3} main.js (main) 126 bytes >{0}< >{1}< >{2}< [entry] [rendered]
4+
chunk {3} main.js (main) 195 bytes >{0}< >{1}< >{2}< (prefetch: {0} {1} {2}) [entry] [rendered]
55
chunk {4} c1.js (c1) 0 bytes <{2}> [rendered]
66
chunk {5} c2.js (c2) 0 bytes <{2}> [rendered]
77
chunk {6} b1.js (b1) 0 bytes <{1}> [rendered]
Collapse file

‎test/statsCases/prefetch-preload-mixed/index.js‎

Copy file name to clipboard
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import(/* webpackChunkName: "a" */"./a");
2-
import(/* webpackChunkName: "b" */"./b");
3-
import(/* webpackChunkName: "c" */"./c");
1+
import(/* webpackPrefetch: true, webpackChunkName: "a" */"./a");
2+
import(/* webpackPrefetch: true, webpackChunkName: "b" */"./b");
3+
import(/* webpackPrefetch: true, webpackChunkName: "c" */"./c");

0 commit comments

Comments
0 (0)
You are visitor 01402622 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.