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 #6827 from Connormiha/optimize-sort-by-identifier · webpack/webpack@f600ccd

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • ContextModule.js
    • MultiModule.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/ContextModule.js‎

Copy file name to clipboardExpand all lines: lib/ContextModule.js
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ class ContextModule extends Module {
4343

4444
if (typeof options.mode !== "string")
4545
throw new Error("options.mode is a required option");
46+
47+
this._identifier = this._createIdentifier();
4648
}
4749

4850
updateCacheModule(module) {
@@ -69,7 +71,7 @@ class ContextModule extends Module {
6971
.join("!");
7072
}
7173

72-
identifier() {
74+
_createIdentifier() {
7375
let identifier = this.context;
7476
if (this.options.resourceQuery)
7577
identifier += ` ${this.options.resourceQuery}`;
@@ -86,6 +88,10 @@ class ContextModule extends Module {
8688
return identifier;
8789
}
8890

91+
identifier() {
92+
return this._identifier;
93+
}
94+
8995
readableIdentifier(requestShortener) {
9096
let identifier = requestShortener.shorten(this.context);
9197
if (this.options.resourceQuery)
Collapse file

‎lib/MultiModule.js‎

Copy file name to clipboardExpand all lines: lib/MultiModule.js
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@ class MultiModule extends Module {
1515
// Info from Factory
1616
this.dependencies = dependencies;
1717
this.name = name;
18+
this._identifier = `multi ${this.dependencies
19+
.map(d => d.request)
20+
.join(" ")}`;
1821
}
1922

2023
identifier() {
21-
return `multi ${this.dependencies.map(d => d.request).join(" ")}`;
24+
return this._identifier;
2225
}
2326

2427
readableIdentifier(requestShortener) {

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.