webpack 5.99.9 → 5.100.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 (306) hide show
  1. package/bin/webpack.js +8 -2
  2. package/hot/log.js +15 -15
  3. package/hot/poll.js +1 -0
  4. package/lib/APIPlugin.js +3 -3
  5. package/lib/AbstractMethodError.js +1 -0
  6. package/lib/AutomaticPrefetchPlugin.js +1 -0
  7. package/lib/BannerPlugin.js +1 -1
  8. package/lib/CaseSensitiveModulesWarning.js +4 -4
  9. package/lib/Chunk.js +6 -6
  10. package/lib/ChunkGraph.js +37 -31
  11. package/lib/ChunkGroup.js +4 -4
  12. package/lib/ChunkTemplate.js +1 -1
  13. package/lib/CleanPlugin.js +94 -17
  14. package/lib/CodeGenerationResults.js +1 -1
  15. package/lib/CompatibilityPlugin.js +5 -2
  16. package/lib/Compilation.js +67 -45
  17. package/lib/Compiler.js +46 -16
  18. package/lib/ConcatenationScope.js +15 -6
  19. package/lib/ConstPlugin.js +5 -3
  20. package/lib/ContextModule.js +16 -12
  21. package/lib/ContextModuleFactory.js +4 -3
  22. package/lib/ContextReplacementPlugin.js +4 -2
  23. package/lib/CssModule.js +2 -2
  24. package/lib/DefinePlugin.js +111 -3
  25. package/lib/DelegatedModuleFactoryPlugin.js +18 -18
  26. package/lib/Dependency.js +6 -1
  27. package/lib/DependencyTemplate.js +1 -0
  28. package/lib/DllEntryPlugin.js +3 -1
  29. package/lib/DllPlugin.js +4 -3
  30. package/lib/DllReferencePlugin.js +2 -2
  31. package/lib/DynamicEntryPlugin.js +1 -1
  32. package/lib/EntryOptionPlugin.js +5 -0
  33. package/lib/ErrorHelpers.js +4 -4
  34. package/lib/EvalDevToolModulePlugin.js +3 -3
  35. package/lib/EvalSourceMapDevToolPlugin.js +7 -7
  36. package/lib/ExportsInfo.js +48 -39
  37. package/lib/ExternalModule.js +15 -11
  38. package/lib/ExternalModuleFactoryPlugin.js +5 -2
  39. package/lib/FileSystemInfo.js +51 -36
  40. package/lib/FlagDependencyExportsPlugin.js +14 -7
  41. package/lib/FlagDependencyUsagePlugin.js +1 -1
  42. package/lib/Generator.js +14 -1
  43. package/lib/HookWebpackError.js +1 -0
  44. package/lib/HotModuleReplacementPlugin.js +77 -50
  45. package/lib/IgnorePlugin.js +1 -1
  46. package/lib/InvalidDependenciesModuleWarning.js +1 -1
  47. package/lib/JavascriptMetaInfoPlugin.js +0 -1
  48. package/lib/LibManifestPlugin.js +4 -2
  49. package/lib/LoaderOptionsPlugin.js +6 -4
  50. package/lib/MainTemplate.js +2 -2
  51. package/lib/Module.js +21 -6
  52. package/lib/ModuleFactory.js +1 -0
  53. package/lib/ModuleGraph.js +24 -2
  54. package/lib/ModuleGraphConnection.js +5 -5
  55. package/lib/ModuleInfoHeaderPlugin.js +2 -1
  56. package/lib/ModuleParseError.js +1 -0
  57. package/lib/ModuleSourceTypesConstants.js +12 -12
  58. package/lib/ModuleTemplate.js +1 -1
  59. package/lib/ModuleTypeConstants.js +21 -21
  60. package/lib/MultiCompiler.js +6 -6
  61. package/lib/NormalModule.js +31 -44
  62. package/lib/NormalModuleFactory.js +29 -19
  63. package/lib/NormalModuleReplacementPlugin.js +1 -1
  64. package/lib/NullFactory.js +1 -0
  65. package/lib/OptimizationStages.js +1 -1
  66. package/lib/Parser.js +1 -0
  67. package/lib/ProgressPlugin.js +12 -5
  68. package/lib/ProvidePlugin.js +5 -1
  69. package/lib/RecordIdsPlugin.js +3 -3
  70. package/lib/RuntimeGlobals.js +175 -155
  71. package/lib/RuntimeModule.js +1 -0
  72. package/lib/RuntimePlugin.js +33 -7
  73. package/lib/RuntimeTemplate.js +111 -11
  74. package/lib/SourceMapDevToolModuleOptionsPlugin.js +15 -25
  75. package/lib/SourceMapDevToolPlugin.js +19 -17
  76. package/lib/Template.js +2 -2
  77. package/lib/TemplatedPathPlugin.js +1 -1
  78. package/lib/WarnDeprecatedOptionPlugin.js +7 -8
  79. package/lib/WatchIgnorePlugin.js +4 -3
  80. package/lib/WebpackIsIncludedPlugin.js +2 -1
  81. package/lib/WebpackOptionsApply.js +115 -27
  82. package/lib/asset/AssetGenerator.js +15 -11
  83. package/lib/asset/AssetModulesPlugin.js +19 -17
  84. package/lib/asset/AssetSourceGenerator.js +4 -4
  85. package/lib/asset/RawDataUrlModule.js +4 -2
  86. package/lib/async-modules/AwaitDependenciesInitFragment.js +1 -1
  87. package/lib/buildChunkGraph.js +6 -3
  88. package/lib/cache/AddBuildDependenciesPlugin.js +5 -6
  89. package/lib/cache/IdleFileCachePlugin.js +7 -4
  90. package/lib/cache/MemoryCachePlugin.js +1 -0
  91. package/lib/cache/MemoryWithGcCachePlugin.js +1 -0
  92. package/lib/cache/PackFileCacheStrategy.js +26 -20
  93. package/lib/cache/ResolverCachePlugin.js +16 -8
  94. package/lib/cli.js +15 -10
  95. package/lib/config/browserslistTargetHandler.js +3 -3
  96. package/lib/config/defaults.js +25 -17
  97. package/lib/config/normalization.js +2 -1
  98. package/lib/config/target.js +6 -5
  99. package/lib/container/ContainerPlugin.js +1 -1
  100. package/lib/container/ContainerReferencePlugin.js +1 -1
  101. package/lib/container/FallbackModule.js +2 -1
  102. package/lib/container/HoistContainerReferencesPlugin.js +1 -1
  103. package/lib/container/ModuleFederationPlugin.js +2 -2
  104. package/lib/container/RemoteModule.js +1 -1
  105. package/lib/css/CssGenerator.js +9 -6
  106. package/lib/css/CssModulesPlugin.js +44 -31
  107. package/lib/css/CssParser.js +6 -4
  108. package/lib/css/walkCssTokens.js +33 -37
  109. package/lib/debug/ProfilingPlugin.js +6 -6
  110. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +8 -8
  111. package/lib/dependencies/AMDPlugin.js +12 -8
  112. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +28 -26
  113. package/lib/dependencies/CachedConstDependency.js +1 -5
  114. package/lib/dependencies/CommonJsExportRequireDependency.js +6 -4
  115. package/lib/dependencies/CommonJsExportsParserPlugin.js +22 -25
  116. package/lib/dependencies/CommonJsFullRequireDependency.js +1 -9
  117. package/lib/dependencies/CommonJsImportsParserPlugin.js +100 -114
  118. package/lib/dependencies/CommonJsPlugin.js +15 -16
  119. package/lib/dependencies/ContextDependencyHelpers.js +2 -1
  120. package/lib/dependencies/ContextDependencyTemplateAsId.js +1 -0
  121. package/lib/dependencies/ContextDependencyTemplateAsRequireCall.js +1 -0
  122. package/lib/dependencies/CssIcssExportDependency.js +1 -1
  123. package/lib/dependencies/CssLocalIdentifierDependency.js +2 -2
  124. package/lib/dependencies/CssSelfLocalIdentifierDependency.js +2 -1
  125. package/lib/dependencies/DynamicExports.js +9 -9
  126. package/lib/dependencies/ExportsInfoDependency.js +1 -1
  127. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +122 -101
  128. package/lib/dependencies/HarmonyExportExpressionDependency.js +1 -1
  129. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +95 -19
  130. package/lib/dependencies/HarmonyExportInitFragment.js +1 -1
  131. package/lib/dependencies/HarmonyImportDependency.js +11 -5
  132. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +238 -162
  133. package/lib/dependencies/HarmonyImportSideEffectDependency.js +4 -1
  134. package/lib/dependencies/HarmonyImportSpecifierDependency.js +20 -9
  135. package/lib/dependencies/HarmonyModulesPlugin.js +23 -12
  136. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +1 -0
  137. package/lib/dependencies/ImportMetaContextPlugin.js +2 -1
  138. package/lib/dependencies/ImportMetaPlugin.js +2 -2
  139. package/lib/dependencies/ImportParserPlugin.js +40 -9
  140. package/lib/dependencies/ImportPlugin.js +3 -1
  141. package/lib/dependencies/LoaderPlugin.js +1 -0
  142. package/lib/dependencies/ModuleDependencyTemplateAsRequireId.js +1 -0
  143. package/lib/dependencies/RequireContextPlugin.js +3 -1
  144. package/lib/dependencies/RequireEnsurePlugin.js +6 -6
  145. package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +33 -34
  146. package/lib/dependencies/RequireIncludePlugin.js +1 -0
  147. package/lib/dependencies/RuntimeRequirementsDependency.js +1 -1
  148. package/lib/dependencies/SystemPlugin.js +1 -1
  149. package/lib/dependencies/URLContextDependency.js +65 -0
  150. package/lib/dependencies/URLPlugin.js +17 -157
  151. package/lib/dependencies/WorkerPlugin.js +23 -10
  152. package/lib/dependencies/processExportInfo.js +2 -1
  153. package/lib/esm/ModuleChunkFormatPlugin.js +269 -185
  154. package/lib/esm/ModuleChunkLoadingPlugin.js +39 -1
  155. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +70 -3
  156. package/lib/hmr/HotModuleReplacement.runtime.js +0 -1
  157. package/lib/hmr/HotModuleReplacementRuntimeModule.js +1 -1
  158. package/lib/hmr/JavascriptHotModuleReplacementHelper.js +37 -0
  159. package/lib/hmr/LazyCompilationPlugin.js +4 -2
  160. package/lib/hmr/lazyCompilationBackend.js +4 -2
  161. package/lib/ids/ChunkModuleIdRangePlugin.js +6 -3
  162. package/lib/ids/DeterministicChunkIdsPlugin.js +30 -35
  163. package/lib/ids/DeterministicModuleIdsPlugin.js +4 -3
  164. package/lib/ids/HashedModuleIdsPlugin.js +5 -4
  165. package/lib/ids/IdHelpers.js +21 -17
  166. package/lib/ids/NamedChunkIdsPlugin.js +5 -5
  167. package/lib/ids/NamedModuleIdsPlugin.js +4 -4
  168. package/lib/ids/NaturalChunkIdsPlugin.js +2 -1
  169. package/lib/ids/NaturalModuleIdsPlugin.js +1 -1
  170. package/lib/ids/OccurrenceChunkIdsPlugin.js +3 -2
  171. package/lib/ids/OccurrenceModuleIdsPlugin.js +1 -1
  172. package/lib/ids/SyncModuleIdsPlugin.js +1 -1
  173. package/lib/index.js +13 -3
  174. package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +113 -119
  175. package/lib/javascript/BasicEvaluatedExpression.js +2 -1
  176. package/lib/javascript/ChunkHelpers.js +1 -0
  177. package/lib/javascript/CommonJsChunkFormatPlugin.js +121 -136
  178. package/lib/javascript/EnableChunkLoadingPlugin.js +6 -3
  179. package/lib/javascript/JavascriptGenerator.js +14 -2
  180. package/lib/javascript/JavascriptModulesPlugin.js +68 -27
  181. package/lib/javascript/JavascriptParser.js +117 -76
  182. package/lib/javascript/JavascriptParserHelpers.js +41 -41
  183. package/lib/javascript/StartupHelpers.js +17 -17
  184. package/lib/json/JsonGenerator.js +4 -2
  185. package/lib/json/JsonModulesPlugin.js +2 -2
  186. package/lib/json/JsonParser.js +1 -1
  187. package/lib/library/AbstractLibraryPlugin.js +6 -2
  188. package/lib/library/AssignLibraryPlugin.js +21 -6
  189. package/lib/library/EnableLibraryPlugin.js +23 -3
  190. package/lib/library/UmdLibraryPlugin.js +15 -6
  191. package/lib/logging/createConsoleLogger.js +3 -3
  192. package/lib/logging/runtime.js +9 -9
  193. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +4 -22
  194. package/lib/node/RequireChunkLoadingRuntimeModule.js +4 -22
  195. package/lib/node/nodeConsole.js +4 -2
  196. package/lib/optimize/AggressiveMergingPlugin.js +45 -46
  197. package/lib/optimize/AggressiveSplittingPlugin.js +13 -12
  198. package/lib/optimize/ConcatenatedModule.js +227 -57
  199. package/lib/optimize/EnsureChunkConditionsPlugin.js +58 -58
  200. package/lib/optimize/FlagIncludedChunksPlugin.js +3 -1
  201. package/lib/optimize/InnerGraph.js +115 -112
  202. package/lib/optimize/InnerGraphPlugin.js +2 -2
  203. package/lib/optimize/LimitChunkCountPlugin.js +4 -2
  204. package/lib/optimize/MangleExportsPlugin.js +4 -3
  205. package/lib/optimize/MergeDuplicateChunksPlugin.js +80 -81
  206. package/lib/optimize/MinChunkSizePlugin.js +6 -3
  207. package/lib/optimize/ModuleConcatenationPlugin.js +31 -22
  208. package/lib/optimize/RealContentHashPlugin.js +26 -20
  209. package/lib/optimize/RemoveEmptyChunksPlugin.js +2 -1
  210. package/lib/optimize/RemoveParentModulesPlugin.js +1 -0
  211. package/lib/optimize/SideEffectsFlagPlugin.js +3 -2
  212. package/lib/optimize/SplitChunksPlugin.js +16 -13
  213. package/lib/rules/BasicEffectRulePlugin.js +4 -2
  214. package/lib/rules/BasicMatcherRulePlugin.js +3 -1
  215. package/lib/rules/ObjectMatcherRulePlugin.js +3 -1
  216. package/lib/rules/RuleSetCompiler.js +6 -3
  217. package/lib/rules/UseEffectRulePlugin.js +3 -1
  218. package/lib/runtime/AsyncModuleRuntimeModule.js +64 -9
  219. package/lib/runtime/CreateFakeNamespaceObjectRuntimeModule.js +1 -1
  220. package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +214 -0
  221. package/lib/runtime/RuntimeIdRuntimeModule.js +2 -1
  222. package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +8 -7
  223. package/lib/schemes/FileUriPlugin.js +1 -1
  224. package/lib/schemes/HttpUriPlugin.js +27 -19
  225. package/lib/schemes/VirtualUrlPlugin.js +222 -0
  226. package/lib/serialization/AggregateErrorSerializer.js +1 -1
  227. package/lib/serialization/BinaryMiddleware.js +5 -4
  228. package/lib/serialization/FileMiddleware.js +7 -4
  229. package/lib/serialization/ObjectMiddleware.js +14 -8
  230. package/lib/serialization/Serializer.js +5 -3
  231. package/lib/serialization/SerializerMiddleware.js +2 -0
  232. package/lib/sharing/ConsumeSharedModule.js +1 -1
  233. package/lib/sharing/ConsumeSharedPlugin.js +3 -3
  234. package/lib/sharing/ConsumeSharedRuntimeModule.js +2 -2
  235. package/lib/sharing/ProvideSharedModule.js +1 -1
  236. package/lib/sharing/ProvideSharedPlugin.js +3 -2
  237. package/lib/sharing/SharePlugin.js +2 -1
  238. package/lib/sharing/ShareRuntimeModule.js +3 -5
  239. package/lib/sharing/utils.js +34 -34
  240. package/lib/stats/DefaultStatsFactoryPlugin.js +49 -46
  241. package/lib/stats/DefaultStatsPresetPlugin.js +4 -2
  242. package/lib/stats/DefaultStatsPrinterPlugin.js +15 -9
  243. package/lib/stats/StatsFactory.js +4 -2
  244. package/lib/stats/StatsPrinter.js +3 -2
  245. package/lib/url/URLParserPlugin.js +266 -0
  246. package/lib/util/ArrayQueue.js +1 -1
  247. package/lib/util/AsyncQueue.js +1 -1
  248. package/lib/util/Hash.js +2 -0
  249. package/lib/util/IterableHelpers.js +1 -1
  250. package/lib/util/LazyBucketSortedSet.js +2 -1
  251. package/lib/util/LazySet.js +11 -6
  252. package/lib/util/ParallelismFactorCalculator.js +1 -1
  253. package/lib/util/SetHelpers.js +3 -3
  254. package/lib/util/SortableSet.js +2 -2
  255. package/lib/util/StackedCacheMap.js +3 -1
  256. package/lib/util/StackedMap.js +2 -2
  257. package/lib/util/StringXor.js +1 -0
  258. package/lib/util/TupleSet.js +1 -0
  259. package/lib/util/URLAbsoluteSpecifier.js +1 -1
  260. package/lib/util/cleverMerge.js +12 -8
  261. package/lib/util/comparators.js +154 -127
  262. package/lib/util/compileBooleanMatcher.js +8 -3
  263. package/lib/util/concatenate.js +8 -7
  264. package/lib/util/conventions.js +72 -73
  265. package/lib/util/create-schema-validation.js +2 -1
  266. package/lib/util/createHash.js +10 -4
  267. package/lib/util/deprecation.js +69 -66
  268. package/lib/util/deterministicGrouping.js +4 -2
  269. package/lib/util/extractUrlAndGlobal.js +1 -1
  270. package/lib/util/findGraphRoots.js +2 -2
  271. package/lib/util/fs.js +30 -23
  272. package/lib/util/hash/md4.js +2 -2
  273. package/lib/util/hash/wasm-hash.js +4 -2
  274. package/lib/util/identifier.js +13 -12
  275. package/lib/util/internalSerializables.js +2 -0
  276. package/lib/util/magicComment.js +5 -5
  277. package/lib/util/processAsyncTree.js +1 -1
  278. package/lib/util/propertyAccess.js +1 -1
  279. package/lib/util/propertyName.js +1 -1
  280. package/lib/util/registerExternalSerializer.js +1 -2
  281. package/lib/util/removeBOM.js +1 -1
  282. package/lib/util/runtime.js +29 -21
  283. package/lib/util/semver.js +1 -1
  284. package/lib/util/serialization.js +3 -0
  285. package/lib/util/source.js +3 -2
  286. package/lib/validateSchema.js +1 -0
  287. package/lib/wasm/EnableWasmLoadingPlugin.js +6 -3
  288. package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +4 -1
  289. package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +46 -49
  290. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +2 -2
  291. package/lib/wasm-sync/WebAssemblyGenerator.js +2 -3
  292. package/lib/wasm-sync/WebAssemblyInInitialChunkError.js +3 -2
  293. package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +3 -0
  294. package/lib/wasm-sync/WebAssemblyUtils.js +1 -1
  295. package/lib/web/JsonpChunkLoadingRuntimeModule.js +4 -22
  296. package/lib/webpack.js +4 -5
  297. package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +1 -0
  298. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +6 -24
  299. package/lib/webworker/WebWorkerTemplatePlugin.js +1 -0
  300. package/package.json +119 -113
  301. package/schemas/WebpackOptions.check.js +1 -1
  302. package/schemas/WebpackOptions.json +17 -0
  303. package/schemas/plugins/schemes/VirtualUrlPlugin.check.d.ts +7 -0
  304. package/schemas/plugins/schemes/VirtualUrlPlugin.check.js +6 -0
  305. package/schemas/plugins/schemes/VirtualUrlPlugin.json +77 -0
  306. package/types.d.ts +1230 -360
@@ -12,6 +12,10 @@ const createSchemaValidation = require("./util/create-schema-validation");
12
12
  const { contextify } = require("./util/identifier");
13
13
 
14
14
  /** @typedef {import("tapable").Tap} Tap */
15
+ /**
16
+ * @template T, R, AdditionalOptions
17
+ * @typedef {import("tapable").Hook<T, R, AdditionalOptions>} Hook
18
+ */
15
19
  /** @typedef {import("../declarations/plugins/ProgressPlugin").HandlerFunction} HandlerFunction */
16
20
  /** @typedef {import("../declarations/plugins/ProgressPlugin").ProgressPluginArgument} ProgressPluginArgument */
17
21
  /** @typedef {import("../declarations/plugins/ProgressPlugin").ProgressPluginOptions} ProgressPluginOptions */
@@ -34,7 +38,7 @@ const { contextify } = require("./util/identifier");
34
38
  */
35
39
 
36
40
  const validate = createSchemaValidation(
37
- require("../schemas/plugins/ProgressPlugin.check.js"),
41
+ require("../schemas/plugins/ProgressPlugin.check"),
38
42
  () => require("../schemas/plugins/ProgressPlugin.json"),
39
43
  {
40
44
  name: "Progress Plugin",
@@ -321,14 +325,16 @@ class ProgressPlugin {
321
325
  skippedDependenciesCount++;
322
326
  }
323
327
  dependenciesCount++;
324
- if (dependenciesCount < 50 || dependenciesCount % 100 === 0)
328
+ if (dependenciesCount < 50 || dependenciesCount % 100 === 0) {
325
329
  updateThrottled();
330
+ }
326
331
  };
327
332
 
328
333
  const factorizeDone = () => {
329
334
  doneDependencies++;
330
- if (doneDependencies < 50 || doneDependencies % 100 === 0)
335
+ if (doneDependencies < 50 || doneDependencies % 100 === 0) {
331
336
  updateThrottled();
337
+ }
332
338
  };
333
339
 
334
340
  /**
@@ -413,7 +419,7 @@ class ProgressPlugin {
413
419
  }
414
420
  return data;
415
421
  },
416
- err => {
422
+ _err => {
417
423
  // Ignore error
418
424
  }
419
425
  );
@@ -582,7 +588,8 @@ class ProgressPlugin {
582
588
  }
583
589
  });
584
590
  /**
585
- * @param {TODO} hook hook
591
+ * @template {Hook<EXPECTED_ANY, EXPECTED_ANY, EXPECTED_ANY>} T
592
+ * @param {T} hook hook
586
593
  * @param {number} progress progress from 0 to 1
587
594
  * @param {string} category category
588
595
  * @param {string} name name
@@ -61,7 +61,11 @@ class ProvidePlugin {
61
61
  for (const name of Object.keys(definitions)) {
62
62
  const request =
63
63
  /** @type {string[]} */
64
- ([]).concat(definitions[name]);
64
+ ([
65
+ ...(Array.isArray(definitions[name])
66
+ ? definitions[name]
67
+ : [definitions[name]])
68
+ ]);
65
69
  const splittedName = name.split(".");
66
70
  if (splittedName.length > 0) {
67
71
  for (const [i, _] of splittedName.slice(1).entries()) {
@@ -22,7 +22,6 @@ const identifierUtils = require("./util/identifier");
22
22
  /**
23
23
  * @typedef {object} RecordsModules
24
24
  * @property {Record<string, number>=} byIdentifier
25
- * @property {Record<string, number>=} bySource
26
25
  * @property {number[]=} usedIds
27
26
  */
28
27
 
@@ -85,7 +84,7 @@ class RecordIdsPlugin {
85
84
  records.modules.byIdentifier[identifier] = moduleId;
86
85
  usedIds.add(moduleId);
87
86
  }
88
- records.modules.usedIds = Array.from(usedIds).sort(compareNumbers);
87
+ records.modules.usedIds = [...usedIds].sort(compareNumbers);
89
88
  });
90
89
  compilation.hooks.reviveModules.tap(PLUGIN_NAME, (modules, records) => {
91
90
  if (!records.modules) return;
@@ -169,7 +168,7 @@ class RecordIdsPlugin {
169
168
  }
170
169
  usedIds.add(chunk.id);
171
170
  }
172
- records.chunks.usedIds = Array.from(usedIds).sort(compareNumbers);
171
+ records.chunks.usedIds = [...usedIds].sort(compareNumbers);
173
172
  });
174
173
  compilation.hooks.reviveChunks.tap(PLUGIN_NAME, (chunks, records) => {
175
174
  if (!records.chunks) return;
@@ -209,4 +208,5 @@ class RecordIdsPlugin {
209
208
  });
210
209
  }
211
210
  }
211
+
212
212
  module.exports = RecordIdsPlugin;
@@ -6,69 +6,87 @@
6
6
  "use strict";
7
7
 
8
8
  /**
9
- * the internal require function
9
+ * the AMD define function
10
10
  */
11
- module.exports.require = "__webpack_require__";
11
+ module.exports.amdDefine = "__webpack_require__.amdD";
12
12
 
13
13
  /**
14
- * access to properties of the internal require function/object
14
+ * the AMD options
15
15
  */
16
- module.exports.requireScope = "__webpack_require__.*";
16
+ module.exports.amdOptions = "__webpack_require__.amdO";
17
17
 
18
18
  /**
19
- * the internal exports object
19
+ * Creates an async module. The body function must be a async function.
20
+ * "module.exports" will be decorated with an AsyncModulePromise.
21
+ * The body function will be called.
22
+ * To handle async dependencies correctly do this: "([a, b, c] = await handleDependencies([a, b, c]));".
23
+ * If "hasAwaitAfterDependencies" is truthy, "handleDependencies()" must be called at the end of the body function.
24
+ * Signature: function(
25
+ * module: Module,
26
+ * body: (handleDependencies: (deps: AsyncModulePromise[]) => Promise<any[]> & () => void,
27
+ * hasAwaitAfterDependencies?: boolean
28
+ * ) => void
20
29
  */
21
- module.exports.exports = "__webpack_exports__";
30
+ module.exports.asyncModule = "__webpack_require__.a";
22
31
 
23
32
  /**
24
- * top-level this need to be the exports object
33
+ * The internal symbol that asyncModule is using.
25
34
  */
26
- module.exports.thisAsExports = "top-level-this-exports";
35
+ module.exports.asyncModuleDoneSymbol = "__webpack_require__.aD";
27
36
 
28
37
  /**
29
- * runtime need to return the exports of the last entry module
38
+ * The internal symbol that asyncModule is using.
30
39
  */
31
- module.exports.returnExportsFromRuntime = "return-exports-from-runtime";
40
+ module.exports.asyncModuleExportSymbol = "__webpack_require__.aE";
32
41
 
33
42
  /**
34
- * the internal module object
43
+ * the baseURI of current document
35
44
  */
36
- module.exports.module = "module";
45
+ module.exports.baseURI = "__webpack_require__.b";
37
46
 
38
47
  /**
39
- * the internal module object
48
+ * global callback functions for installing chunks
40
49
  */
41
- module.exports.moduleId = "module.id";
50
+ module.exports.chunkCallback = "webpackChunk";
42
51
 
43
52
  /**
44
- * the internal module object
53
+ * the chunk name of the chunk with the runtime
45
54
  */
46
- module.exports.moduleLoaded = "module.loaded";
55
+ module.exports.chunkName = "__webpack_require__.cn";
47
56
 
48
57
  /**
49
- * the bundle public path
58
+ * compatibility get default export
50
59
  */
51
- module.exports.publicPath = "__webpack_require__.p";
60
+ module.exports.compatGetDefaultExport = "__webpack_require__.n";
52
61
 
53
62
  /**
54
- * the module id of the entry point
63
+ * create a fake namespace object
55
64
  */
56
- module.exports.entryModuleId = "__webpack_require__.s";
65
+ module.exports.createFakeNamespaceObject = "__webpack_require__.t";
57
66
 
58
67
  /**
59
- * the module cache
68
+ * function to promote a string to a TrustedScript using webpack's Trusted
69
+ * Types policy
70
+ * Arguments: (script: string) => TrustedScript
60
71
  */
61
- module.exports.moduleCache = "__webpack_require__.c";
72
+ module.exports.createScript = "__webpack_require__.ts";
62
73
 
63
74
  /**
64
- * the module functions
75
+ * function to promote a string to a TrustedScriptURL using webpack's Trusted
76
+ * Types policy
77
+ * Arguments: (url: string) => TrustedScriptURL
65
78
  */
66
- module.exports.moduleFactories = "__webpack_require__.m";
79
+ module.exports.createScriptUrl = "__webpack_require__.tu";
67
80
 
68
81
  /**
69
- * the module functions, with only write access
82
+ * The current scope when getting a module from a remote
70
83
  */
71
- module.exports.moduleFactoriesAddOnly = "__webpack_require__.m (add only)";
84
+ module.exports.currentRemoteGetScope = "__webpack_require__.R";
85
+
86
+ /**
87
+ * the exported property define getters function
88
+ */
89
+ module.exports.definePropertyGetters = "__webpack_require__.d";
72
90
 
73
91
  /**
74
92
  * the chunk ensure function
@@ -87,181 +105,182 @@ module.exports.ensureChunkIncludeEntries =
87
105
  "__webpack_require__.f (include entries)";
88
106
 
89
107
  /**
90
- * the chunk prefetch function
108
+ * the module id of the entry point
91
109
  */
92
- module.exports.prefetchChunk = "__webpack_require__.E";
110
+ module.exports.entryModuleId = "__webpack_require__.s";
93
111
 
94
112
  /**
95
- * an object with handlers to prefetch a chunk
113
+ * the internal exports object
96
114
  */
97
- module.exports.prefetchChunkHandlers = "__webpack_require__.F";
115
+ module.exports.exports = "__webpack_exports__";
98
116
 
99
117
  /**
100
- * the chunk preload function
118
+ * method to install a chunk that was loaded somehow
119
+ * Signature: ({ id, ids, modules, runtime }) => void
101
120
  */
102
- module.exports.preloadChunk = "__webpack_require__.G";
121
+ module.exports.externalInstallChunk = "__webpack_require__.C";
103
122
 
104
123
  /**
105
- * an object with handlers to preload a chunk
124
+ * the filename of the css part of the chunk
106
125
  */
107
- module.exports.preloadChunkHandlers = "__webpack_require__.H";
126
+ module.exports.getChunkCssFilename = "__webpack_require__.k";
108
127
 
109
128
  /**
110
- * the exported property define getters function
129
+ * the filename of the script part of the chunk
111
130
  */
112
- module.exports.definePropertyGetters = "__webpack_require__.d";
131
+ module.exports.getChunkScriptFilename = "__webpack_require__.u";
113
132
 
114
133
  /**
115
- * define compatibility on export
134
+ * the filename of the css part of the hot update chunk
116
135
  */
117
- module.exports.makeNamespaceObject = "__webpack_require__.r";
136
+ module.exports.getChunkUpdateCssFilename = "__webpack_require__.hk";
118
137
 
119
138
  /**
120
- * create a fake namespace object
139
+ * the filename of the script part of the hot update chunk
121
140
  */
122
- module.exports.createFakeNamespaceObject = "__webpack_require__.t";
141
+ module.exports.getChunkUpdateScriptFilename = "__webpack_require__.hu";
123
142
 
124
143
  /**
125
- * compatibility get default export
144
+ * the webpack hash
126
145
  */
127
- module.exports.compatGetDefaultExport = "__webpack_require__.n";
146
+ module.exports.getFullHash = "__webpack_require__.h";
128
147
 
129
148
  /**
130
- * harmony module decorator
149
+ * function to return webpack's Trusted Types policy
150
+ * Arguments: () => TrustedTypePolicy
131
151
  */
132
- module.exports.harmonyModuleDecorator = "__webpack_require__.hmd";
152
+ module.exports.getTrustedTypesPolicy = "__webpack_require__.tt";
133
153
 
134
154
  /**
135
- * node.js module decorator
155
+ * the filename of the HMR manifest
136
156
  */
137
- module.exports.nodeModuleDecorator = "__webpack_require__.nmd";
157
+ module.exports.getUpdateManifestFilename = "__webpack_require__.hmrF";
138
158
 
139
159
  /**
140
- * the webpack hash
160
+ * the global object
141
161
  */
142
- module.exports.getFullHash = "__webpack_require__.h";
162
+ module.exports.global = "__webpack_require__.g";
143
163
 
144
164
  /**
145
- * an object containing all installed WebAssembly.Instance export objects keyed by module id
165
+ * harmony module decorator
146
166
  */
147
- module.exports.wasmInstances = "__webpack_require__.w";
167
+ module.exports.harmonyModuleDecorator = "__webpack_require__.hmd";
148
168
 
149
169
  /**
150
- * instantiate a wasm instance from module exports object, id, hash and importsObject
170
+ * a flag when a module/chunk/tree has css modules
151
171
  */
152
- module.exports.instantiateWasm = "__webpack_require__.v";
172
+ module.exports.hasCssModules = "has css modules";
153
173
 
154
174
  /**
155
- * the uncaught error handler for the webpack runtime
175
+ * a flag when a chunk has a fetch priority
156
176
  */
157
- module.exports.uncaughtErrorHandler = "__webpack_require__.oe";
177
+ module.exports.hasFetchPriority = "has fetch priority";
158
178
 
159
179
  /**
160
- * the script nonce
180
+ * the shorthand for Object.prototype.hasOwnProperty
181
+ * using of it decreases the compiled bundle size
161
182
  */
162
- module.exports.scriptNonce = "__webpack_require__.nc";
183
+ module.exports.hasOwnProperty = "__webpack_require__.o";
163
184
 
164
185
  /**
165
- * function to load a script tag.
166
- * Arguments: (url: string, done: (event) => void), key?: string | number, chunkId?: string | number) => void
167
- * done function is called when loading has finished or timeout occurred.
168
- * It will attach to existing script tags with data-webpack == uniqueName + ":" + key or src == url.
186
+ * function downloading the update manifest
169
187
  */
170
- module.exports.loadScript = "__webpack_require__.l";
188
+ module.exports.hmrDownloadManifest = "__webpack_require__.hmrM";
171
189
 
172
190
  /**
173
- * function to promote a string to a TrustedScript using webpack's Trusted
174
- * Types policy
175
- * Arguments: (script: string) => TrustedScript
191
+ * array with handler functions to download chunk updates
176
192
  */
177
- module.exports.createScript = "__webpack_require__.ts";
193
+ module.exports.hmrDownloadUpdateHandlers = "__webpack_require__.hmrC";
178
194
 
179
195
  /**
180
- * function to promote a string to a TrustedScriptURL using webpack's Trusted
181
- * Types policy
182
- * Arguments: (url: string) => TrustedScriptURL
196
+ * array with handler functions when a module should be invalidated
183
197
  */
184
- module.exports.createScriptUrl = "__webpack_require__.tu";
198
+ module.exports.hmrInvalidateModuleHandlers = "__webpack_require__.hmrI";
185
199
 
186
200
  /**
187
- * function to return webpack's Trusted Types policy
188
- * Arguments: () => TrustedTypePolicy
201
+ * object with all hmr module data for all modules
189
202
  */
190
- module.exports.getTrustedTypesPolicy = "__webpack_require__.tt";
203
+ module.exports.hmrModuleData = "__webpack_require__.hmrD";
191
204
 
192
205
  /**
193
- * a flag when a chunk has a fetch priority
206
+ * the prefix for storing state of runtime modules when hmr is enabled
194
207
  */
195
- module.exports.hasFetchPriority = "has fetch priority";
208
+ module.exports.hmrRuntimeStatePrefix = "__webpack_require__.hmrS";
196
209
 
197
210
  /**
198
- * the chunk name of the chunk with the runtime
211
+ * The sharing init sequence function (only runs once per share scope).
212
+ * Has one argument, the name of the share scope.
213
+ * Creates a share scope if not existing
199
214
  */
200
- module.exports.chunkName = "__webpack_require__.cn";
215
+ module.exports.initializeSharing = "__webpack_require__.I";
201
216
 
202
217
  /**
203
- * the runtime id of the current runtime
218
+ * instantiate a wasm instance from module exports object, id, hash and importsObject
204
219
  */
205
- module.exports.runtimeId = "__webpack_require__.j";
220
+ module.exports.instantiateWasm = "__webpack_require__.v";
206
221
 
207
222
  /**
208
- * the filename of the script part of the chunk
223
+ * interceptor for module executions
209
224
  */
210
- module.exports.getChunkScriptFilename = "__webpack_require__.u";
225
+ module.exports.interceptModuleExecution = "__webpack_require__.i";
211
226
 
212
227
  /**
213
- * the filename of the css part of the chunk
228
+ * function to load a script tag.
229
+ * Arguments: (url: string, done: (event) => void), key?: string | number, chunkId?: string | number) => void
230
+ * done function is called when loading has finished or timeout occurred.
231
+ * It will attach to existing script tags with data-webpack == uniqueName + ":" + key or src == url.
214
232
  */
215
- module.exports.getChunkCssFilename = "__webpack_require__.k";
233
+ module.exports.loadScript = "__webpack_require__.l";
216
234
 
217
235
  /**
218
- * a flag when a module/chunk/tree has css modules
236
+ * make a deferred namespace object
219
237
  */
220
- module.exports.hasCssModules = "has css modules";
238
+ module.exports.makeDeferredNamespaceObject = "__webpack_require__.z";
221
239
 
222
240
  /**
223
- * the filename of the script part of the hot update chunk
241
+ * the internal symbol that makeDeferredNamespaceObject is using.
224
242
  */
225
- module.exports.getChunkUpdateScriptFilename = "__webpack_require__.hu";
243
+ module.exports.makeDeferredNamespaceObjectSymbol = "__webpack_require__.zS";
226
244
 
227
245
  /**
228
- * the filename of the css part of the hot update chunk
246
+ * define compatibility on export
229
247
  */
230
- module.exports.getChunkUpdateCssFilename = "__webpack_require__.hk";
248
+ module.exports.makeNamespaceObject = "__webpack_require__.r";
231
249
 
232
250
  /**
233
- * startup signal from runtime
234
- * This will be called when the runtime chunk has been loaded.
251
+ * the internal module object
235
252
  */
236
- module.exports.startup = "__webpack_require__.x";
253
+ module.exports.module = "module";
237
254
 
238
255
  /**
239
- * @deprecated
240
- * creating a default startup function with the entry modules
256
+ * the module cache
241
257
  */
242
- module.exports.startupNoDefault = "__webpack_require__.x (no default handler)";
258
+ module.exports.moduleCache = "__webpack_require__.c";
243
259
 
244
260
  /**
245
- * startup signal from runtime but only used to add logic after the startup
261
+ * the module functions
246
262
  */
247
- module.exports.startupOnlyAfter = "__webpack_require__.x (only after)";
263
+ module.exports.moduleFactories = "__webpack_require__.m";
248
264
 
249
265
  /**
250
- * startup signal from runtime but only used to add sync logic before the startup
266
+ * the module functions, with only write access
251
267
  */
252
- module.exports.startupOnlyBefore = "__webpack_require__.x (only before)";
268
+ module.exports.moduleFactoriesAddOnly = "__webpack_require__.m (add only)";
253
269
 
254
270
  /**
255
- * global callback functions for installing chunks
271
+ * the internal module object
256
272
  */
257
- module.exports.chunkCallback = "webpackChunk";
273
+ module.exports.moduleId = "module.id";
258
274
 
259
275
  /**
260
- * method to startup an entrypoint with needed chunks.
261
- * Signature: (moduleId: Id, chunkIds: Id[]) => any.
262
- * Returns the exports of the module or a Promise
276
+ * the internal module object
263
277
  */
264
- module.exports.startupEntrypoint = "__webpack_require__.X";
278
+ module.exports.moduleLoaded = "module.loaded";
279
+
280
+ /**
281
+ * node.js module decorator
282
+ */
283
+ module.exports.nodeModuleDecorator = "__webpack_require__.nmd";
265
284
 
266
285
  /**
267
286
  * register deferred code, which will run when certain
@@ -274,88 +293,98 @@ module.exports.startupEntrypoint = "__webpack_require__.X";
274
293
  module.exports.onChunksLoaded = "__webpack_require__.O";
275
294
 
276
295
  /**
277
- * method to install a chunk that was loaded somehow
278
- * Signature: ({ id, ids, modules, runtime }) => void
296
+ * the chunk prefetch function
279
297
  */
280
- module.exports.externalInstallChunk = "__webpack_require__.C";
298
+ module.exports.prefetchChunk = "__webpack_require__.E";
281
299
 
282
300
  /**
283
- * interceptor for module executions
301
+ * an object with handlers to prefetch a chunk
284
302
  */
285
- module.exports.interceptModuleExecution = "__webpack_require__.i";
303
+ module.exports.prefetchChunkHandlers = "__webpack_require__.F";
286
304
 
287
305
  /**
288
- * the global object
306
+ * the chunk preload function
289
307
  */
290
- module.exports.global = "__webpack_require__.g";
308
+ module.exports.preloadChunk = "__webpack_require__.G";
291
309
 
292
310
  /**
293
- * an object with all share scopes
311
+ * an object with handlers to preload a chunk
294
312
  */
295
- module.exports.shareScopeMap = "__webpack_require__.S";
313
+ module.exports.preloadChunkHandlers = "__webpack_require__.H";
296
314
 
297
315
  /**
298
- * The sharing init sequence function (only runs once per share scope).
299
- * Has one argument, the name of the share scope.
300
- * Creates a share scope if not existing
316
+ * the bundle public path
301
317
  */
302
- module.exports.initializeSharing = "__webpack_require__.I";
318
+ module.exports.publicPath = "__webpack_require__.p";
303
319
 
304
320
  /**
305
- * The current scope when getting a module from a remote
321
+ * a RelativeURL class when relative URLs are used
306
322
  */
307
- module.exports.currentRemoteGetScope = "__webpack_require__.R";
323
+ module.exports.relativeUrl = "__webpack_require__.U";
308
324
 
309
325
  /**
310
- * the filename of the HMR manifest
326
+ * the internal require function
311
327
  */
312
- module.exports.getUpdateManifestFilename = "__webpack_require__.hmrF";
328
+ module.exports.require = "__webpack_require__";
313
329
 
314
330
  /**
315
- * function downloading the update manifest
331
+ * access to properties of the internal require function/object
316
332
  */
317
- module.exports.hmrDownloadManifest = "__webpack_require__.hmrM";
333
+ module.exports.requireScope = "__webpack_require__.*";
318
334
 
319
335
  /**
320
- * array with handler functions to download chunk updates
336
+ * runtime need to return the exports of the last entry module
321
337
  */
322
- module.exports.hmrDownloadUpdateHandlers = "__webpack_require__.hmrC";
338
+ module.exports.returnExportsFromRuntime = "return-exports-from-runtime";
323
339
 
324
340
  /**
325
- * object with all hmr module data for all modules
341
+ * the runtime id of the current runtime
326
342
  */
327
- module.exports.hmrModuleData = "__webpack_require__.hmrD";
343
+ module.exports.runtimeId = "__webpack_require__.j";
328
344
 
329
345
  /**
330
- * array with handler functions when a module should be invalidated
346
+ * the script nonce
331
347
  */
332
- module.exports.hmrInvalidateModuleHandlers = "__webpack_require__.hmrI";
348
+ module.exports.scriptNonce = "__webpack_require__.nc";
333
349
 
334
350
  /**
335
- * the prefix for storing state of runtime modules when hmr is enabled
351
+ * an object with all share scopes
336
352
  */
337
- module.exports.hmrRuntimeStatePrefix = "__webpack_require__.hmrS";
353
+ module.exports.shareScopeMap = "__webpack_require__.S";
338
354
 
339
355
  /**
340
- * the AMD define function
356
+ * startup signal from runtime
357
+ * This will be called when the runtime chunk has been loaded.
341
358
  */
342
- module.exports.amdDefine = "__webpack_require__.amdD";
359
+ module.exports.startup = "__webpack_require__.x";
343
360
 
344
361
  /**
345
- * the AMD options
362
+ * method to startup an entrypoint with needed chunks.
363
+ * Signature: (moduleId: Id, chunkIds: Id[]) => any.
364
+ * Returns the exports of the module or a Promise
346
365
  */
347
- module.exports.amdOptions = "__webpack_require__.amdO";
366
+ module.exports.startupEntrypoint = "__webpack_require__.X";
348
367
 
349
368
  /**
350
- * the System polyfill object
369
+ * @deprecated
370
+ * creating a default startup function with the entry modules
351
371
  */
352
- module.exports.system = "__webpack_require__.System";
372
+ module.exports.startupNoDefault = "__webpack_require__.x (no default handler)";
353
373
 
354
374
  /**
355
- * the shorthand for Object.prototype.hasOwnProperty
356
- * using of it decreases the compiled bundle size
375
+ * startup signal from runtime but only used to add logic after the startup
357
376
  */
358
- module.exports.hasOwnProperty = "__webpack_require__.o";
377
+ module.exports.startupOnlyAfter = "__webpack_require__.x (only after)";
378
+
379
+ /**
380
+ * startup signal from runtime but only used to add sync logic before the startup
381
+ */
382
+ module.exports.startupOnlyBefore = "__webpack_require__.x (only before)";
383
+
384
+ /**
385
+ * the System polyfill object
386
+ */
387
+ module.exports.system = "__webpack_require__.System";
359
388
 
360
389
  /**
361
390
  * the System.register context object
@@ -363,25 +392,16 @@ module.exports.hasOwnProperty = "__webpack_require__.o";
363
392
  module.exports.systemContext = "__webpack_require__.y";
364
393
 
365
394
  /**
366
- * the baseURI of current document
395
+ * top-level this need to be the exports object
367
396
  */
368
- module.exports.baseURI = "__webpack_require__.b";
397
+ module.exports.thisAsExports = "top-level-this-exports";
369
398
 
370
399
  /**
371
- * a RelativeURL class when relative URLs are used
400
+ * the uncaught error handler for the webpack runtime
372
401
  */
373
- module.exports.relativeUrl = "__webpack_require__.U";
402
+ module.exports.uncaughtErrorHandler = "__webpack_require__.oe";
374
403
 
375
404
  /**
376
- * Creates an async module. The body function must be a async function.
377
- * "module.exports" will be decorated with an AsyncModulePromise.
378
- * The body function will be called.
379
- * To handle async dependencies correctly do this: "([a, b, c] = await handleDependencies([a, b, c]));".
380
- * If "hasAwaitAfterDependencies" is truthy, "handleDependencies()" must be called at the end of the body function.
381
- * Signature: function(
382
- * module: Module,
383
- * body: (handleDependencies: (deps: AsyncModulePromise[]) => Promise<any[]> & () => void,
384
- * hasAwaitAfterDependencies?: boolean
385
- * ) => void
405
+ * an object containing all installed WebAssembly.Instance export objects keyed by module id
386
406
  */
387
- module.exports.asyncModule = "__webpack_require__.a";
407
+ module.exports.wasmInstances = "__webpack_require__.w";
@@ -172,6 +172,7 @@ class RuntimeModule extends Module {
172
172
  */
173
173
  generate() {
174
174
  const AbstractMethodError = require("./AbstractMethodError");
175
+
175
176
  throw new AbstractMethodError();
176
177
  }
177
178