webpack 4.13.0 → 4.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/bin/webpack.js +7 -2
  2. package/hot/dev-server.js +2 -2
  3. package/hot/only-dev-server.js +2 -2
  4. package/hot/poll.js +5 -2
  5. package/hot/signal.js +2 -2
  6. package/lib/AsyncDependenciesBlock.js +44 -0
  7. package/lib/AutomaticPrefetchPlugin.js +2 -2
  8. package/lib/Chunk.js +56 -6
  9. package/lib/ChunkGroup.js +2 -2
  10. package/lib/ChunkTemplate.js +14 -2
  11. package/lib/CommentCompilationWarning.js +3 -3
  12. package/lib/CompatibilityPlugin.js +1 -1
  13. package/lib/Compilation.js +494 -36
  14. package/lib/Compiler.js +57 -4
  15. package/lib/ContextModule.js +23 -16
  16. package/lib/DelegatedModule.js +9 -1
  17. package/lib/DelegatedModuleFactoryPlugin.js +7 -1
  18. package/lib/DependenciesBlock.js +36 -3
  19. package/lib/DependenciesBlockVariable.js +22 -0
  20. package/lib/Dependency.js +33 -6
  21. package/lib/DllEntryPlugin.js +4 -1
  22. package/lib/DynamicEntryPlugin.js +21 -1
  23. package/lib/EntryOptionPlugin.js +12 -0
  24. package/lib/Entrypoint.js +1 -1
  25. package/lib/EnvironmentPlugin.js +8 -1
  26. package/lib/ExtendedAPIPlugin.js +8 -4
  27. package/lib/ExternalModuleFactoryPlugin.js +1 -1
  28. package/lib/FlagDependencyUsagePlugin.js +18 -13
  29. package/lib/Generator.js +1 -1
  30. package/lib/GraphHelpers.js +2 -1
  31. package/lib/HotModuleReplacement.runtime.js +8 -5
  32. package/lib/HotModuleReplacementPlugin.js +115 -117
  33. package/lib/IgnorePlugin.js +1 -1
  34. package/lib/MainTemplate.js +19 -4
  35. package/lib/Module.js +9 -3
  36. package/lib/ModuleReason.js +8 -0
  37. package/lib/MultiEntryPlugin.js +25 -3
  38. package/lib/NormalModule.js +5 -23
  39. package/lib/RuleSet.js +3 -3
  40. package/lib/RuntimeTemplate.js +4 -0
  41. package/lib/SingleEntryPlugin.js +20 -1
  42. package/lib/Stats.js +12 -5
  43. package/lib/Template.js +4 -1
  44. package/lib/UmdMainTemplatePlugin.js +12 -12
  45. package/lib/UseStrictPlugin.js +1 -1
  46. package/lib/WebpackError.js +4 -0
  47. package/lib/WebpackOptionsApply.js +92 -10
  48. package/lib/WebpackOptionsDefaulter.js +23 -6
  49. package/lib/WebpackOptionsValidationError.js +0 -1
  50. package/lib/compareLocations.js +13 -17
  51. package/lib/debug/ProfilingPlugin.js +5 -7
  52. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +4 -6
  53. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +0 -2
  54. package/lib/dependencies/DependencyReference.js +4 -0
  55. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +18 -8
  56. package/lib/dependencies/LoaderDependency.js +3 -0
  57. package/lib/dependencies/LoaderPlugin.js +21 -2
  58. package/lib/dependencies/ModuleDependency.js +3 -0
  59. package/lib/dependencies/MultiEntryDependency.js +5 -0
  60. package/lib/dependencies/SingleEntryDependency.js +3 -0
  61. package/lib/dependencies/SystemPlugin.js +1 -1
  62. package/lib/formatLocation.js +55 -41
  63. package/lib/node/NodeMainTemplateAsync.runtime.js +1 -1
  64. package/lib/node/NodeMainTemplatePlugin.js +2 -2
  65. package/lib/node/NodeSourcePlugin.js +1 -1
  66. package/lib/optimize/ConcatenatedModule.js +24 -8
  67. package/lib/optimize/ModuleConcatenationPlugin.js +29 -14
  68. package/lib/optimize/NaturalChunkOrderPlugin.js +41 -0
  69. package/lib/optimize/OccurrenceChunkOrderPlugin.js +61 -0
  70. package/lib/optimize/OccurrenceModuleOrderPlugin.js +103 -0
  71. package/lib/optimize/OccurrenceOrderPlugin.js +2 -0
  72. package/lib/optimize/SplitChunksPlugin.js +168 -18
  73. package/lib/util/Semaphore.js +12 -0
  74. package/lib/util/SetHelpers.js +4 -4
  75. package/lib/util/SortableSet.js +1 -1
  76. package/lib/util/cachedMerge.js +1 -1
  77. package/lib/util/createHash.js +15 -0
  78. package/lib/util/deterministicGrouping.js +251 -0
  79. package/lib/util/identifier.js +27 -0
  80. package/lib/wasm/WasmFinalizeExportsPlugin.js +5 -2
  81. package/lib/wasm/WasmMainTemplatePlugin.js +10 -4
  82. package/lib/wasm/WebAssemblyGenerator.js +12 -12
  83. package/lib/wasm/WebAssemblyInInitialChunkError.js +88 -0
  84. package/lib/wasm/WebAssemblyModulesPlugin.js +28 -0
  85. package/lib/web/JsonpMainTemplatePlugin.js +1 -1
  86. package/lib/web/WebEnvironmentPlugin.js +18 -18
  87. package/lib/webpack.js +7 -0
  88. package/lib/webpack.web.js +2 -2
  89. package/lib/webworker/WebWorkerMainTemplatePlugin.js +1 -1
  90. package/package.json +21 -11
  91. package/schemas/WebpackOptions.json +70 -4
  92. package/schemas/plugins/optimize/OccurrenceOrderChunkIdsPlugin.json +10 -0
  93. package/schemas/plugins/optimize/OccurrenceOrderModuleIdsPlugin.json +10 -0
package/bin/webpack.js CHANGED
@@ -159,8 +159,13 @@ if (installedClis.length === 0) {
159
159
  } else if (installedClis.length === 1) {
160
160
  const path = require("path");
161
161
  const pkgPath = require.resolve(`${installedClis[0].package}/package.json`);
162
- const pkg = require(pkgPath); // eslint-disable-line
163
- require(path.resolve(path.dirname(pkgPath), pkg.bin[installedClis[0].binName])); // eslint-disable-line
162
+ // eslint-disable-next-line node/no-missing-require
163
+ const pkg = require(pkgPath);
164
+ // eslint-disable-next-line node/no-missing-require
165
+ require(path.resolve(
166
+ path.dirname(pkgPath),
167
+ pkg.bin[installedClis[0].binName]
168
+ ));
164
169
  } else {
165
170
  console.warn(
166
171
  `You have installed ${installedClis
package/hot/dev-server.js CHANGED
@@ -40,10 +40,10 @@ if (module.hot) {
40
40
  "warning",
41
41
  "[HMR] Cannot apply update. Need to do a full reload!"
42
42
  );
43
- log("warning", "[HMR] " + err.stack || err.message);
43
+ log("warning", "[HMR] " + (err.stack || err.message));
44
44
  window.location.reload();
45
45
  } else {
46
- log("warning", "[HMR] Update failed: " + err.stack || err.message);
46
+ log("warning", "[HMR] Update failed: " + (err.stack || err.message));
47
47
  }
48
48
  });
49
49
  };
@@ -72,11 +72,11 @@ if (module.hot) {
72
72
  "warning",
73
73
  "[HMR] Cannot check for update. Need to do a full reload!"
74
74
  );
75
- log("warning", "[HMR] " + err.stack || err.message);
75
+ log("warning", "[HMR] " + (err.stack || err.message));
76
76
  } else {
77
77
  log(
78
78
  "warning",
79
- "[HMR] Update check failed: " + err.stack || err.message
79
+ "[HMR] Update check failed: " + (err.stack || err.message)
80
80
  );
81
81
  }
82
82
  });
package/hot/poll.js CHANGED
@@ -23,10 +23,13 @@ if (module.hot) {
23
23
  var status = module.hot.status();
24
24
  if (["abort", "fail"].indexOf(status) >= 0) {
25
25
  log("warning", "[HMR] Cannot apply update.");
26
- log("warning", "[HMR] " + err.stack || err.message);
26
+ log("warning", "[HMR] " + (err.stack || err.message));
27
27
  log("warning", "[HMR] You need to restart the application!");
28
28
  } else {
29
- log("warning", "[HMR] Update failed: " + err.stack || err.message);
29
+ log(
30
+ "warning",
31
+ "[HMR] Update failed: " + (err.stack || err.message)
32
+ );
30
33
  }
31
34
  });
32
35
  }
package/hot/signal.js CHANGED
@@ -37,10 +37,10 @@ if (module.hot) {
37
37
  var status = module.hot.status();
38
38
  if (["abort", "fail"].indexOf(status) >= 0) {
39
39
  log("warning", "[HMR] Cannot apply update.");
40
- log("warning", "[HMR] " + err.stack || err.message);
40
+ log("warning", "[HMR] " + (err.stack || err.message));
41
41
  log("warning", "[HMR] You need to restart the application!");
42
42
  } else {
43
- log("warning", "[HMR] Update failed: " + err.stack || err.message);
43
+ log("warning", "[HMR] Update failed: " + (err.stack || err.message));
44
44
  }
45
45
  });
46
46
  };
@@ -3,9 +3,22 @@
3
3
  Author Tobias Koppers @sokra
4
4
  */
5
5
  "use strict";
6
+
6
7
  const DependenciesBlock = require("./DependenciesBlock");
7
8
 
9
+ /** @typedef {import("./ChunkGroup")} ChunkGroup */
10
+ /** @typedef {import("./Module")} Module */
11
+ /** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */
12
+ /** @typedef {import("./util/createHash").Hash} Hash */
13
+ /** @typedef {TODO} GroupOptions */
14
+
8
15
  module.exports = class AsyncDependenciesBlock extends DependenciesBlock {
16
+ /**
17
+ * @param {GroupOptions} groupOptions options for the group
18
+ * @param {Module} module the Module object
19
+ * @param {DependencyLocation=} loc the line of code
20
+ * @param {TODO=} request the request
21
+ */
9
22
  constructor(groupOptions, module, loc, request) {
10
23
  super();
11
24
  if (typeof groupOptions === "string") {
@@ -14,28 +27,50 @@ module.exports = class AsyncDependenciesBlock extends DependenciesBlock {
14
27
  groupOptions = { name: undefined };
15
28
  }
16
29
  this.groupOptions = groupOptions;
30
+ /** @type {ChunkGroup=} */
17
31
  this.chunkGroup = undefined;
18
32
  this.module = module;
19
33
  this.loc = loc;
20
34
  this.request = request;
35
+ /** @type {DependenciesBlock} */
36
+ this.parent = undefined;
21
37
  }
22
38
 
39
+ /**
40
+ * @returns {string} The name of the chunk
41
+ */
23
42
  get chunkName() {
24
43
  return this.groupOptions.name;
25
44
  }
26
45
 
46
+ /**
47
+ * @param {string} value The new chunk name
48
+ * @returns {void}
49
+ */
27
50
  set chunkName(value) {
28
51
  this.groupOptions.name = value;
29
52
  }
30
53
 
54
+ /**
55
+ * @returns {never} this throws and should never be called
56
+ */
31
57
  get chunks() {
32
58
  throw new Error("Moved to AsyncDependenciesBlock.chunkGroup");
33
59
  }
34
60
 
61
+ /**
62
+ * @param {never} value setter value
63
+ * @returns {never} this is going to throw therefore we should throw type
64
+ * assertions by returning never
65
+ */
35
66
  set chunks(value) {
36
67
  throw new Error("Moved to AsyncDependenciesBlock.chunkGroup");
37
68
  }
38
69
 
70
+ /**
71
+ * @param {Hash} hash the hash used to track block changes, from "crypto" module
72
+ * @returns {void}
73
+ */
39
74
  updateHash(hash) {
40
75
  hash.update(JSON.stringify(this.groupOptions));
41
76
  hash.update(
@@ -50,16 +85,25 @@ module.exports = class AsyncDependenciesBlock extends DependenciesBlock {
50
85
  super.updateHash(hash);
51
86
  }
52
87
 
88
+ /**
89
+ * @returns {void}
90
+ */
53
91
  disconnect() {
54
92
  this.chunkGroup = undefined;
55
93
  super.disconnect();
56
94
  }
57
95
 
96
+ /**
97
+ * @returns {void}
98
+ */
58
99
  unseal() {
59
100
  this.chunkGroup = undefined;
60
101
  super.unseal();
61
102
  }
62
103
 
104
+ /**
105
+ * @returns {void}
106
+ */
63
107
  sortItems() {
64
108
  super.sortItems();
65
109
  }
@@ -8,7 +8,7 @@ const asyncLib = require("neo-async");
8
8
  const PrefetchDependency = require("./dependencies/PrefetchDependency");
9
9
  const NormalModule = require("./NormalModule");
10
10
 
11
- /** @typedef {import("./Compiler.js")} Compiler */
11
+ /** @typedef {import("./Compiler")} Compiler */
12
12
 
13
13
  class AutomaticPrefetchPlugin {
14
14
  /**
@@ -30,7 +30,7 @@ class AutomaticPrefetchPlugin {
30
30
  compiler.hooks.afterCompile.tap("AutomaticPrefetchPlugin", compilation => {
31
31
  lastModules = compilation.modules
32
32
  .filter(m => m instanceof NormalModule)
33
- .map(m => ({
33
+ .map((/** @type {NormalModule} */ m) => ({
34
34
  context: m.context,
35
35
  request: m.request
36
36
  }));
package/lib/Chunk.js CHANGED
@@ -13,10 +13,11 @@ const ERR_CHUNK_ENTRY = "Chunk.entry was removed. Use hasRuntime()";
13
13
  const ERR_CHUNK_INITIAL =
14
14
  "Chunk.initial was removed. Use canBeInitial/isOnlyInitial()";
15
15
 
16
- /** @typedef {import("./Module.js")} Module */
16
+ /** @typedef {import("./Module")} Module */
17
17
  /** @typedef {import("./ChunkGroup")} ChunkGroup */
18
- /** @typedef {import("./ModuleReason.js")} ModuleReason */
18
+ /** @typedef {import("./ModuleReason")} ModuleReason */
19
19
  /** @typedef {import("webpack-sources").Source} Source */
20
+ /** @typedef {import("./util/createHash").Hash} Hash */
20
21
 
21
22
  /**
22
23
  * @typedef {Object} WithId an object who has an id property *
@@ -29,6 +30,12 @@ const ERR_CHUNK_INITIAL =
29
30
  * @param {Module} b module
30
31
  * @returns {-1|0|1} sort value
31
32
  */
33
+
34
+ // TODO use @callback
35
+ /** @typedef {(a: Module, b: Module) => -1|0|1} ModuleSortPredicate */
36
+ /** @typedef {(m: Module) => boolean} ModuleFilterPredicate */
37
+ /** @typedef {(c: Chunk) => boolean} ChunkFilterPredicate */
38
+
32
39
  const sortModuleById = (a, b) => {
33
40
  if (a.id < b.id) return -1;
34
41
  if (b.id < a.id) return 1;
@@ -114,9 +121,14 @@ class Chunk {
114
121
  this.entryModule = undefined;
115
122
  /** @private @type {SortableSet<Module>} */
116
123
  this._modules = new SortableSet(undefined, sortByIdentifier);
124
+ /** @type {string?} */
125
+ this.filenameTemplate = undefined;
126
+
127
+ /** @private */
128
+ this._groups = new SortableSet(undefined, sortChunkGroupById);
117
129
  /** @private @type {SortableSet<ChunkGroup>} */
118
130
  this._groups = new SortableSet(undefined, sortChunkGroupById);
119
- /** @type {Source[]} */
131
+ /** @type {string[]} */
120
132
  this.files = [];
121
133
  /** @type {boolean} */
122
134
  this.rendered = false;
@@ -288,7 +300,7 @@ class Chunk {
288
300
  }
289
301
 
290
302
  /**
291
- * @returns {SortableSet} the chunkGroups that said chunk is referenced in
303
+ * @returns {SortableSet<ChunkGroup>} the chunkGroups that said chunk is referenced in
292
304
  */
293
305
  get groupsIterable() {
294
306
  return this._groups;
@@ -305,7 +317,7 @@ class Chunk {
305
317
  if (this._modules.size < otherChunk._modules.size) return 1;
306
318
  const a = this._modules[Symbol.iterator]();
307
319
  const b = otherChunk._modules[Symbol.iterator]();
308
- // eslint-disable-next-line
320
+ // eslint-disable-next-line no-constant-condition
309
321
  while (true) {
310
322
  const aItem = a.next();
311
323
  const bItem = b.next();
@@ -482,6 +494,11 @@ class Chunk {
482
494
  return this.addMultiplierAndOverhead(this.modulesSize(), options);
483
495
  }
484
496
 
497
+ /**
498
+ * @param {Chunk} otherChunk the other chunk
499
+ * @param {TODO} options the options for this function
500
+ * @returns {number | false} the size, or false if it can't be integrated
501
+ */
485
502
  integratedSize(otherChunk, options) {
486
503
  // Chunk if it's possible to integrate this chunk
487
504
  if (!this.canBeIntegrated(otherChunk)) {
@@ -511,6 +528,9 @@ class Chunk {
511
528
  this.sortModules();
512
529
  }
513
530
 
531
+ /**
532
+ * @returns {Set<Chunk>} a set of all the async chunks
533
+ */
514
534
  getAllAsyncChunks() {
515
535
  const queue = new Set();
516
536
  const chunks = new Set();
@@ -539,9 +559,23 @@ class Chunk {
539
559
  return chunks;
540
560
  }
541
561
 
562
+ /**
563
+ * @typedef {Object} ChunkMaps
564
+ * @property {Record<string|number, string>} hash
565
+ * @property {Record<string|number, Record<string, string>>} contentHash
566
+ * @property {Record<string|number, string>} name
567
+ */
568
+
569
+ /**
570
+ * @param {boolean} realHash should the full hash or the rendered hash be used
571
+ * @returns {ChunkMaps} the chunk map information
572
+ */
542
573
  getChunkMaps(realHash) {
574
+ /** @type {Record<string|number, string>} */
543
575
  const chunkHashMap = Object.create(null);
576
+ /** @type {Record<string|number, Record<string, string>>} */
544
577
  const chunkContentHashMap = Object.create(null);
578
+ /** @type {Record<string|number, string>} */
545
579
  const chunkNameMap = Object.create(null);
546
580
 
547
581
  for (const chunk of this.getAllAsyncChunks()) {
@@ -564,6 +598,9 @@ class Chunk {
564
598
  };
565
599
  }
566
600
 
601
+ /**
602
+ * @returns {Record<string, Set<TODO>[]>} a record object of names to lists of child ids(?)
603
+ */
567
604
  getChildIdsByOrders() {
568
605
  const lists = new Map();
569
606
  for (const group of this.groupsIterable) {
@@ -591,7 +628,7 @@ class Chunk {
591
628
  list.sort((a, b) => {
592
629
  const cmp = b.order - a.order;
593
630
  if (cmp !== 0) return cmp;
594
- // TOOD webpack 5 remove this check of compareTo
631
+ // TODO webpack 5 remove this check of compareTo
595
632
  if (a.group.compareTo) {
596
633
  return a.group.compareTo(b.group);
597
634
  }
@@ -634,11 +671,24 @@ class Chunk {
634
671
  return chunkMaps;
635
672
  }
636
673
 
674
+ /**
675
+ * @typedef {Object} ChunkModuleMaps
676
+ * @property {Record<string|number, (string|number)[]>} id
677
+ * @property {Record<string|number, string>} hash
678
+ */
679
+
680
+ /**
681
+ * @param {ModuleFilterPredicate} filterFn function used to filter modules
682
+ * @returns {ChunkModuleMaps} module map information
683
+ */
637
684
  getChunkModuleMaps(filterFn) {
685
+ /** @type {Record<string|number, (string|number)[]>} */
638
686
  const chunkModuleIdMap = Object.create(null);
687
+ /** @type {Record<string|number, string>} */
639
688
  const chunkModuleHashMap = Object.create(null);
640
689
 
641
690
  for (const chunk of this.getAllAsyncChunks()) {
691
+ /** @type {(string|number)[]} */
642
692
  let array;
643
693
  for (const module of chunk.modulesIterable) {
644
694
  if (filterFn(module)) {
package/lib/ChunkGroup.js CHANGED
@@ -407,7 +407,7 @@ class ChunkGroup {
407
407
  if (this.chunks.length < otherGroup.chunks.length) return 1;
408
408
  const a = this.chunks[Symbol.iterator]();
409
409
  const b = otherGroup.chunks[Symbol.iterator]();
410
- // eslint-disable-next-line
410
+ // eslint-disable-next-line no-constant-condition
411
411
  while (true) {
412
412
  const aItem = a.next();
413
413
  const bItem = b.next();
@@ -442,7 +442,7 @@ class ChunkGroup {
442
442
  list.sort((a, b) => {
443
443
  const cmp = b.order - a.order;
444
444
  if (cmp !== 0) return cmp;
445
- // TOOD webpack 5 remove this check of compareTo
445
+ // TODO webpack 5 remove this check of compareTo
446
446
  if (a.group.compareTo) {
447
447
  return a.group.compareTo(b.group);
448
448
  }
@@ -9,12 +9,12 @@ const { Tapable, SyncWaterfallHook, SyncHook } = require("tapable");
9
9
  /** @typedef {import("./ModuleTemplate")} ModuleTemplate */
10
10
  /** @typedef {import("./Chunk")} Chunk */
11
11
  /** @typedef {import("./Module")} Module} */
12
- /** @typedef {import("crypto").Hash} Hash */
12
+ /** @typedef {import("./util/createHash").Hash} Hash} */
13
13
 
14
14
  /**
15
15
  * @typedef {Object} RenderManifestOptions
16
16
  * @property {Chunk} chunk the chunk used to render
17
- * @property {Hash} hash
17
+ * @property {string} hash
18
18
  * @property {string} fullHash
19
19
  * @property {TODO} outputOptions
20
20
  * @property {{javascript: ModuleTemplate, webassembly: ModuleTemplate}} moduleTemplates
@@ -26,6 +26,7 @@ module.exports = class ChunkTemplate extends Tapable {
26
26
  super();
27
27
  this.outputOptions = outputOptions || {};
28
28
  this.hooks = {
29
+ /** @type {SyncWaterfallHook<TODO[], RenderManifestOptions>} */
29
30
  renderManifest: new SyncWaterfallHook(["result", "options"]),
30
31
  modules: new SyncWaterfallHook([
31
32
  "source",
@@ -58,12 +59,23 @@ module.exports = class ChunkTemplate extends Tapable {
58
59
  return result;
59
60
  }
60
61
 
62
+ /**
63
+ * Updates hash with information from this template
64
+ * @param {Hash} hash the hash to update
65
+ * @returns {void}
66
+ */
61
67
  updateHash(hash) {
62
68
  hash.update("ChunkTemplate");
63
69
  hash.update("2");
64
70
  this.hooks.hash.call(hash);
65
71
  }
66
72
 
73
+ /**
74
+ * Updates hash with chunk-specific information from this template
75
+ * @param {Hash} hash the hash to update
76
+ * @param {Chunk} chunk the chunk
77
+ * @returns {void}
78
+ */
67
79
  updateHashForChunk(hash, chunk) {
68
80
  this.updateHash(hash);
69
81
  this.hooks.hashForChunk.call(hash, chunk);
@@ -6,16 +6,16 @@
6
6
 
7
7
  const WebpackError = require("./WebpackError");
8
8
 
9
- /** @typedef {import("./Module.js")} Module */
9
+ /** @typedef {import("./Module")} Module */
10
10
 
11
- /** @typedef {import("./Dependency.js").Loc} Loc */
11
+ /** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */
12
12
 
13
13
  class CommentCompilationWarning extends WebpackError {
14
14
  /**
15
15
  *
16
16
  * @param {string} message warning message
17
17
  * @param {Module} module affected module
18
- * @param {Loc} loc affected lines of code
18
+ * @param {DependencyLocation} loc affected lines of code
19
19
  */
20
20
  constructor(message, module, loc) {
21
21
  super(message);
@@ -8,7 +8,7 @@ const ConstDependency = require("./dependencies/ConstDependency");
8
8
 
9
9
  const NullFactory = require("./NullFactory");
10
10
 
11
- /** @typedef {import("./Compiler.js")} Compiler */
11
+ /** @typedef {import("./Compiler")} Compiler */
12
12
 
13
13
  class CompatibilityPlugin {
14
14
  /**