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 — Merge pull request #8440 from Connormiha/oprimize-chunk-can-be-integr… · webpack/webpack@72a8a1f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • Chunk.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
+9-6Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,10 @@ class Chunk {
454454
}
455455

456456
canBeIntegrated(otherChunk) {
457+
if (this.preventIntegration || otherChunk.preventIntegration) {
458+
return false;
459+
}
460+
457461
const isAvailable = (a, b) => {
458462
const queue = new Set(b.groupsIterable);
459463
for (const chunkGroup of queue) {
@@ -466,14 +470,13 @@ class Chunk {
466470
return true;
467471
};
468472

469-
if (this.preventIntegration || otherChunk.preventIntegration) {
470-
return false;
471-
}
473+
const selfHasRuntime = this.hasRuntime();
474+
const otherChunkHasRuntime = otherChunk.hasRuntime();
472475

473-
if (this.hasRuntime() !== otherChunk.hasRuntime()) {
474-
if (this.hasRuntime()) {
476+
if (selfHasRuntime !== otherChunkHasRuntime) {
477+
if (selfHasRuntime) {
475478
return isAvailable(this, otherChunk);
476-
} else if (otherChunk.hasRuntime()) {
479+
} else if (otherChunkHasRuntime) {
477480
return isAvailable(otherChunk, this);
478481
} else {
479482
return false;

0 commit comments

Comments
0 (0)
You are visitor 01402605 — 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.