webpack 5.100.2 → 5.101.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 (304) hide show
  1. package/README.md +12 -10
  2. package/bin/webpack.js +7 -7
  3. package/lib/APIPlugin.js +12 -14
  4. package/lib/AutomaticPrefetchPlugin.js +2 -2
  5. package/lib/BannerPlugin.js +4 -4
  6. package/lib/Cache.js +1 -1
  7. package/lib/CacheFacade.js +7 -7
  8. package/lib/CaseSensitiveModulesWarning.js +2 -2
  9. package/lib/Chunk.js +3 -3
  10. package/lib/ChunkGraph.js +21 -18
  11. package/lib/ChunkGroup.js +4 -4
  12. package/lib/CleanPlugin.js +19 -53
  13. package/lib/CodeGenerationResults.js +3 -3
  14. package/lib/CompatibilityPlugin.js +6 -6
  15. package/lib/Compilation.js +126 -113
  16. package/lib/Compiler.js +37 -37
  17. package/lib/ConcatenationScope.js +39 -1
  18. package/lib/ConstPlugin.js +11 -11
  19. package/lib/ContextExclusionPlugin.js +3 -3
  20. package/lib/ContextModule.js +12 -11
  21. package/lib/ContextModuleFactory.js +11 -11
  22. package/lib/ContextReplacementPlugin.js +5 -5
  23. package/lib/DefinePlugin.js +24 -22
  24. package/lib/DelegatedModuleFactoryPlugin.js +1 -1
  25. package/lib/DllEntryPlugin.js +1 -1
  26. package/lib/DllReferencePlugin.js +1 -1
  27. package/lib/DynamicEntryPlugin.js +3 -3
  28. package/lib/EntryPlugin.js +1 -1
  29. package/lib/EnvironmentPlugin.js +1 -1
  30. package/lib/ErrorHelpers.js +2 -2
  31. package/lib/EvalDevToolModulePlugin.js +2 -2
  32. package/lib/EvalSourceMapDevToolPlugin.js +5 -5
  33. package/lib/ExportsInfo.js +9 -9
  34. package/lib/ExportsInfoApiPlugin.js +2 -2
  35. package/lib/ExternalModule.js +163 -48
  36. package/lib/ExternalModuleFactoryPlugin.js +2 -2
  37. package/lib/ExternalsPlugin.js +45 -0
  38. package/lib/FileSystemInfo.js +64 -61
  39. package/lib/FlagAllModulesAsUsedPlugin.js +2 -2
  40. package/lib/FlagDependencyExportsPlugin.js +7 -7
  41. package/lib/FlagDependencyUsagePlugin.js +4 -4
  42. package/lib/FlagEntryExportAsUsedPlugin.js +1 -1
  43. package/lib/HotModuleReplacementPlugin.js +27 -27
  44. package/lib/IgnorePlugin.js +3 -3
  45. package/lib/IgnoreWarningsPlugin.js +4 -4
  46. package/lib/InitFragment.js +6 -0
  47. package/lib/InvalidDependenciesModuleWarning.js +1 -1
  48. package/lib/JavascriptMetaInfoPlugin.js +1 -1
  49. package/lib/LibManifestPlugin.js +2 -2
  50. package/lib/LoaderOptionsPlugin.js +1 -1
  51. package/lib/LoaderTargetPlugin.js +2 -2
  52. package/lib/MainTemplate.js +1 -1
  53. package/lib/Module.js +1 -1
  54. package/lib/ModuleFilenameHelpers.js +3 -3
  55. package/lib/ModuleGraph.js +9 -5
  56. package/lib/ModuleInfoHeaderPlugin.js +3 -3
  57. package/lib/ModuleParseError.js +5 -3
  58. package/lib/MultiCompiler.js +29 -24
  59. package/lib/MultiStats.js +18 -13
  60. package/lib/MultiWatching.js +1 -1
  61. package/lib/NoEmitOnErrorsPlugin.js +2 -2
  62. package/lib/NodeStuffPlugin.js +27 -15
  63. package/lib/NormalModule.js +23 -23
  64. package/lib/NormalModuleFactory.js +23 -21
  65. package/lib/NormalModuleReplacementPlugin.js +3 -3
  66. package/lib/PrefetchPlugin.js +1 -1
  67. package/lib/ProgressPlugin.js +11 -11
  68. package/lib/ProvidePlugin.js +2 -2
  69. package/lib/RecordIdsPlugin.js +3 -3
  70. package/lib/ResolverFactory.js +3 -3
  71. package/lib/RuntimeGlobals.js +20 -0
  72. package/lib/RuntimePlugin.js +16 -16
  73. package/lib/RuntimeTemplate.js +35 -26
  74. package/lib/SizeFormatHelpers.js +1 -1
  75. package/lib/SourceMapDevToolModuleOptionsPlugin.js +4 -4
  76. package/lib/SourceMapDevToolPlugin.js +9 -9
  77. package/lib/Stats.js +2 -2
  78. package/lib/Template.js +1 -1
  79. package/lib/TemplatedPathPlugin.js +2 -2
  80. package/lib/UseStrictPlugin.js +1 -1
  81. package/lib/WarnCaseSensitiveModulesPlugin.js +1 -1
  82. package/lib/WarnDeprecatedOptionPlugin.js +1 -1
  83. package/lib/WarnNoModeSetPlugin.js +1 -1
  84. package/lib/WatchIgnorePlugin.js +2 -2
  85. package/lib/Watching.js +12 -12
  86. package/lib/WebpackIsIncludedPlugin.js +2 -2
  87. package/lib/WebpackOptionsApply.js +3 -3
  88. package/lib/asset/AssetGenerator.js +1 -1
  89. package/lib/asset/AssetModulesPlugin.js +6 -6
  90. package/lib/async-modules/AsyncModuleHelpers.js +1 -1
  91. package/lib/async-modules/AwaitDependenciesInitFragment.js +36 -24
  92. package/lib/async-modules/InferAsyncModulesPlugin.js +3 -3
  93. package/lib/buildChunkGraph.js +5 -5
  94. package/lib/cache/AddBuildDependenciesPlugin.js +1 -1
  95. package/lib/cache/IdleFileCachePlugin.js +5 -5
  96. package/lib/cache/PackFileCacheStrategy.js +20 -20
  97. package/lib/cache/ResolverCachePlugin.js +4 -4
  98. package/lib/cli.js +196 -14
  99. package/lib/config/browserslistTargetHandler.js +6 -6
  100. package/lib/config/defaults.js +23 -14
  101. package/lib/config/normalization.js +41 -38
  102. package/lib/config/target.js +4 -4
  103. package/lib/container/ContainerEntryModule.js +3 -3
  104. package/lib/container/ContainerPlugin.js +3 -3
  105. package/lib/container/ContainerReferencePlugin.js +3 -3
  106. package/lib/container/FallbackModule.js +1 -1
  107. package/lib/container/HoistContainerReferencesPlugin.js +7 -7
  108. package/lib/container/options.js +4 -4
  109. package/lib/css/CssGenerator.js +5 -3
  110. package/lib/css/CssLoadingRuntimeModule.js +1 -1
  111. package/lib/css/CssModulesPlugin.js +25 -22
  112. package/lib/css/CssParser.js +5 -5
  113. package/lib/css/walkCssTokens.js +9 -9
  114. package/lib/debug/ProfilingPlugin.js +5 -5
  115. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +4 -4
  116. package/lib/dependencies/AMDPlugin.js +3 -3
  117. package/lib/dependencies/AMDRequireArrayDependency.js +1 -1
  118. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +3 -3
  119. package/lib/dependencies/CommonJsExportRequireDependency.js +2 -2
  120. package/lib/dependencies/CommonJsExportsParserPlugin.js +12 -10
  121. package/lib/dependencies/CommonJsImportsParserPlugin.js +21 -19
  122. package/lib/dependencies/CommonJsPlugin.js +2 -2
  123. package/lib/dependencies/ContextDependency.js +1 -1
  124. package/lib/dependencies/ContextDependencyHelpers.js +3 -3
  125. package/lib/dependencies/CssIcssExportDependency.js +2 -2
  126. package/lib/dependencies/CssLocalIdentifierDependency.js +2 -2
  127. package/lib/dependencies/CssUrlDependency.js +4 -4
  128. package/lib/dependencies/DynamicExports.js +5 -5
  129. package/lib/dependencies/HarmonyAcceptDependency.js +39 -5
  130. package/lib/dependencies/HarmonyDetectionParserPlugin.js +2 -2
  131. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +17 -13
  132. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +7 -8
  133. package/lib/dependencies/HarmonyExportInitFragment.js +1 -1
  134. package/lib/dependencies/HarmonyExports.js +1 -1
  135. package/lib/dependencies/HarmonyImportDependency.js +28 -9
  136. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +56 -48
  137. package/lib/dependencies/HarmonyImportSideEffectDependency.js +4 -5
  138. package/lib/dependencies/HarmonyImportSpecifierDependency.js +3 -4
  139. package/lib/dependencies/HarmonyModulesPlugin.js +2 -8
  140. package/lib/dependencies/HarmonyTopLevelThisParserPlugin.js +1 -1
  141. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +4 -4
  142. package/lib/dependencies/ImportMetaPlugin.js +7 -7
  143. package/lib/dependencies/ImportParserPlugin.js +4 -4
  144. package/lib/dependencies/JsonExportsDependency.js +1 -1
  145. package/lib/dependencies/LoaderPlugin.js +4 -4
  146. package/lib/dependencies/ProvidedDependency.js +2 -2
  147. package/lib/dependencies/PureExpressionDependency.js +1 -1
  148. package/lib/dependencies/RequireContextDependencyParserPlugin.js +1 -1
  149. package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +1 -1
  150. package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +3 -3
  151. package/lib/dependencies/SystemPlugin.js +3 -3
  152. package/lib/dependencies/WorkerPlugin.js +5 -5
  153. package/lib/dependencies/getFunctionExpression.js +1 -1
  154. package/lib/esm/ModuleChunkFormatPlugin.js +5 -5
  155. package/lib/esm/ModuleChunkLoadingPlugin.js +2 -2
  156. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +15 -11
  157. package/lib/formatLocation.js +2 -2
  158. package/lib/hmr/HotModuleReplacement.runtime.js +39 -27
  159. package/lib/hmr/JavascriptHotModuleReplacement.runtime.js +43 -32
  160. package/lib/hmr/JavascriptHotModuleReplacementHelper.js +1 -1
  161. package/lib/hmr/LazyCompilationPlugin.js +6 -6
  162. package/lib/hmr/lazyCompilationBackend.js +6 -6
  163. package/lib/ids/ChunkModuleIdRangePlugin.js +4 -4
  164. package/lib/ids/DeterministicChunkIdsPlugin.js +5 -4
  165. package/lib/ids/DeterministicModuleIdsPlugin.js +2 -2
  166. package/lib/ids/HashedModuleIdsPlugin.js +1 -1
  167. package/lib/ids/IdHelpers.js +9 -9
  168. package/lib/ids/NamedChunkIdsPlugin.js +5 -5
  169. package/lib/ids/NamedModuleIdsPlugin.js +2 -2
  170. package/lib/ids/NaturalChunkIdsPlugin.js +2 -2
  171. package/lib/ids/NaturalModuleIdsPlugin.js +1 -1
  172. package/lib/ids/OccurrenceChunkIdsPlugin.js +2 -2
  173. package/lib/ids/OccurrenceModuleIdsPlugin.js +4 -4
  174. package/lib/ids/SyncModuleIdsPlugin.js +4 -4
  175. package/lib/index.js +10 -6
  176. package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +1 -1
  177. package/lib/javascript/BasicEvaluatedExpression.js +3 -3
  178. package/lib/javascript/CommonJsChunkFormatPlugin.js +1 -1
  179. package/lib/javascript/EnableChunkLoadingPlugin.js +1 -1
  180. package/lib/javascript/JavascriptGenerator.js +1 -1
  181. package/lib/javascript/JavascriptModulesPlugin.js +16 -16
  182. package/lib/javascript/JavascriptParser.js +80 -78
  183. package/lib/javascript/JavascriptParserHelpers.js +3 -3
  184. package/lib/javascript/StartupHelpers.js +2 -2
  185. package/lib/json/JsonGenerator.js +2 -2
  186. package/lib/json/JsonModulesPlugin.js +2 -2
  187. package/lib/library/AbstractLibraryPlugin.js +3 -3
  188. package/lib/library/AmdLibraryPlugin.js +3 -3
  189. package/lib/library/AssignLibraryPlugin.js +2 -2
  190. package/lib/library/EnableLibraryPlugin.js +2 -2
  191. package/lib/library/ModuleLibraryPlugin.js +7 -2
  192. package/lib/library/SystemLibraryPlugin.js +6 -4
  193. package/lib/library/UmdLibraryPlugin.js +14 -14
  194. package/lib/logging/createConsoleLogger.js +4 -4
  195. package/lib/logging/runtime.js +3 -3
  196. package/lib/logging/truncateArgs.js +4 -4
  197. package/lib/node/CommonJsChunkLoadingPlugin.js +2 -2
  198. package/lib/node/NodeEnvironmentPlugin.js +1 -1
  199. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +16 -14
  200. package/lib/node/ReadFileCompileAsyncWasmPlugin.js +7 -7
  201. package/lib/node/ReadFileCompileWasmPlugin.js +7 -7
  202. package/lib/node/RequireChunkLoadingRuntimeModule.js +6 -4
  203. package/lib/node/nodeConsole.js +2 -2
  204. package/lib/optimize/AggressiveMergingPlugin.js +2 -2
  205. package/lib/optimize/AggressiveSplittingPlugin.js +10 -10
  206. package/lib/optimize/ConcatenatedModule.js +161 -52
  207. package/lib/optimize/EnsureChunkConditionsPlugin.js +2 -2
  208. package/lib/optimize/FlagIncludedChunksPlugin.js +2 -2
  209. package/lib/optimize/InnerGraph.js +5 -5
  210. package/lib/optimize/InnerGraphPlugin.js +14 -12
  211. package/lib/optimize/LimitChunkCountPlugin.js +5 -5
  212. package/lib/optimize/MangleExportsPlugin.js +5 -5
  213. package/lib/optimize/MergeDuplicateChunksPlugin.js +2 -2
  214. package/lib/optimize/MinChunkSizePlugin.js +3 -3
  215. package/lib/optimize/ModuleConcatenationPlugin.js +45 -38
  216. package/lib/optimize/RealContentHashPlugin.js +23 -23
  217. package/lib/optimize/RemoveEmptyChunksPlugin.js +2 -2
  218. package/lib/optimize/RemoveParentModulesPlugin.js +3 -3
  219. package/lib/optimize/RuntimeChunkPlugin.js +2 -2
  220. package/lib/optimize/SideEffectsFlagPlugin.js +5 -5
  221. package/lib/optimize/SplitChunksPlugin.js +20 -20
  222. package/lib/performance/AssetsOverSizeLimitWarning.js +1 -1
  223. package/lib/performance/EntrypointsOverSizeLimitWarning.js +2 -2
  224. package/lib/performance/SizeLimitsPlugin.js +4 -4
  225. package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +1 -1
  226. package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +3 -3
  227. package/lib/rules/BasicMatcherRulePlugin.js +1 -1
  228. package/lib/rules/RuleSetCompiler.js +10 -10
  229. package/lib/rules/UseEffectRulePlugin.js +2 -2
  230. package/lib/runtime/GetChunkFilenameRuntimeModule.js +15 -15
  231. package/lib/runtime/GetMainFilenameRuntimeModule.js +1 -1
  232. package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +1 -1
  233. package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +1 -1
  234. package/lib/runtime/StartupChunkDependenciesPlugin.js +2 -2
  235. package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +3 -3
  236. package/lib/schemes/DataUriPlugin.js +3 -3
  237. package/lib/schemes/FileUriPlugin.js +1 -1
  238. package/lib/schemes/HttpUriPlugin.js +40 -36
  239. package/lib/schemes/VirtualUrlPlugin.js +1 -1
  240. package/lib/serialization/BinaryMiddleware.js +11 -11
  241. package/lib/serialization/FileMiddleware.js +17 -17
  242. package/lib/serialization/ObjectMiddleware.js +8 -8
  243. package/lib/serialization/Serializer.js +2 -2
  244. package/lib/serialization/SerializerMiddleware.js +2 -2
  245. package/lib/sharing/ConsumeSharedPlugin.js +4 -4
  246. package/lib/sharing/ProvideSharedPlugin.js +4 -4
  247. package/lib/sharing/SharePlugin.js +1 -1
  248. package/lib/sharing/resolveMatchedConfigs.js +1 -1
  249. package/lib/stats/DefaultStatsFactoryPlugin.js +85 -80
  250. package/lib/stats/DefaultStatsPresetPlugin.js +15 -15
  251. package/lib/stats/DefaultStatsPrinterPlugin.js +87 -87
  252. package/lib/stats/StatsFactory.js +7 -7
  253. package/lib/stats/StatsPrinter.js +9 -9
  254. package/lib/url/URLParserPlugin.js +5 -5
  255. package/lib/util/AsyncQueue.js +4 -4
  256. package/lib/util/IterableHelpers.js +2 -2
  257. package/lib/util/LazyBucketSortedSet.js +3 -3
  258. package/lib/util/SetHelpers.js +2 -2
  259. package/lib/util/StackedCacheMap.js +1 -1
  260. package/lib/util/StackedMap.js +1 -1
  261. package/lib/util/TupleSet.js +1 -1
  262. package/lib/util/WeakTupleMap.js +1 -1
  263. package/lib/util/cleverMerge.js +8 -8
  264. package/lib/util/comparators.js +10 -10
  265. package/lib/util/compileBooleanMatcher.js +20 -20
  266. package/lib/util/concatenate.js +3 -3
  267. package/lib/util/conventions.js +4 -4
  268. package/lib/util/create-schema-validation.js +1 -1
  269. package/lib/util/createHash.js +1 -1
  270. package/lib/util/deprecation.js +4 -4
  271. package/lib/util/deterministicGrouping.js +7 -7
  272. package/lib/util/findGraphRoots.js +1 -1
  273. package/lib/util/fs.js +3 -3
  274. package/lib/util/identifier.js +14 -14
  275. package/lib/util/magicComment.js +5 -1
  276. package/lib/util/memoize.js +1 -1
  277. package/lib/util/processAsyncTree.js +2 -2
  278. package/lib/util/propertyName.js +1 -1
  279. package/lib/util/removeBOM.js +1 -1
  280. package/lib/util/runtime.js +6 -6
  281. package/lib/util/semver.js +16 -16
  282. package/lib/util/serialization.js +5 -5
  283. package/lib/util/smartGrouping.js +1 -1
  284. package/lib/validateSchema.js +2 -2
  285. package/lib/wasm/EnableWasmLoadingPlugin.js +1 -1
  286. package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +1 -1
  287. package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +1 -1
  288. package/lib/wasm-async/UniversalCompileAsyncWasmPlugin.js +4 -4
  289. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +13 -9
  290. package/lib/wasm-sync/WasmFinalizeExportsPlugin.js +2 -2
  291. package/lib/wasm-sync/WebAssemblyGenerator.js +14 -14
  292. package/lib/wasm-sync/WebAssemblyInInitialChunkError.js +4 -2
  293. package/lib/wasm-sync/WebAssemblyParser.js +2 -2
  294. package/lib/web/FetchCompileAsyncWasmPlugin.js +4 -4
  295. package/lib/web/FetchCompileWasmPlugin.js +4 -4
  296. package/lib/web/JsonpChunkLoadingPlugin.js +2 -2
  297. package/lib/web/JsonpChunkLoadingRuntimeModule.js +1 -1
  298. package/lib/webpack.js +17 -12
  299. package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +2 -2
  300. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +1 -1
  301. package/package.json +13 -13
  302. package/schemas/WebpackOptions.check.js +1 -1
  303. package/schemas/WebpackOptions.json +4 -0
  304. package/types.d.ts +151 -44
@@ -40,13 +40,13 @@ class MinChunkSizePlugin {
40
40
  apply(compiler) {
41
41
  const options = this.options;
42
42
  const minChunkSize = options.minChunkSize;
43
- compiler.hooks.compilation.tap(PLUGIN_NAME, compilation => {
43
+ compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
44
44
  compilation.hooks.optimizeChunks.tap(
45
45
  {
46
46
  name: PLUGIN_NAME,
47
47
  stage: STAGE_ADVANCED
48
48
  },
49
- chunks => {
49
+ (chunks) => {
50
50
  const chunkGraph = compilation.chunkGraph;
51
51
  const equalOptions = {
52
52
  chunkOverhead: 1,
@@ -81,7 +81,7 @@ class MinChunkSizePlugin {
81
81
  }
82
82
 
83
83
  const sortedSizeFilteredExtendedPairCombinations = combinations
84
- .map(pair => {
84
+ .map((pair) => {
85
85
  // extend combination pairs with size and integrated size
86
86
  const a = chunkSizesMap.get(pair[0]);
87
87
  const b = chunkSizesMap.get(pair[1]);
@@ -46,7 +46,7 @@ const ConcatenatedModule = require("./ConcatenatedModule");
46
46
  * @param {string} msg message
47
47
  * @returns {string} formatted message
48
48
  */
49
- const formatBailoutReason = msg => `ModuleConcatenation bailout: ${msg}`;
49
+ const formatBailoutReason = (msg) => `ModuleConcatenation bailout: ${msg}`;
50
50
 
51
51
  const PLUGIN_NAME = "ModuleConcatenationPlugin";
52
52
 
@@ -58,7 +58,7 @@ class ModuleConcatenationPlugin {
58
58
  */
59
59
  apply(compiler) {
60
60
  const { _backCompat: backCompat } = compiler;
61
- compiler.hooks.compilation.tap(PLUGIN_NAME, compilation => {
61
+ compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
62
62
  if (compilation.moduleMemCaches) {
63
63
  throw new Error(
64
64
  "optimization.concatenateModules can't be used with cacheUnaffected as module concatenation is a global effect"
@@ -78,7 +78,7 @@ class ModuleConcatenationPlugin {
78
78
  .getOptimizationBailout(module)
79
79
  .push(
80
80
  typeof reason === "function"
81
- ? rs => formatBailoutReason(reason(rs))
81
+ ? (rs) => formatBailoutReason(reason(rs))
82
82
  : formatBailoutReason(reason)
83
83
  );
84
84
  };
@@ -107,7 +107,7 @@ class ModuleConcatenationPlugin {
107
107
  * @param {Module | ((requestShortener: RequestShortener) => string)} problem the problem
108
108
  * @returns {(requestShortener: RequestShortener) => string} the reason
109
109
  */
110
- const formatBailoutWarning = (module, problem) => requestShortener => {
110
+ const formatBailoutWarning = (module, problem) => (requestShortener) => {
111
111
  if (typeof problem === "function") {
112
112
  return formatBailoutReason(
113
113
  `Cannot concat with ${module.readableIdentifier(
@@ -149,6 +149,7 @@ class ModuleConcatenationPlugin {
149
149
  chunkGraph,
150
150
  moduleGraph
151
151
  };
152
+ const deferEnabled = compilation.options.experiments.deferImport;
152
153
  logger.time("select relevant modules");
153
154
  for (const module of modules) {
154
155
  let canBeRoot = true;
@@ -182,7 +183,7 @@ class ModuleConcatenationPlugin {
182
183
  const exportsInfo = moduleGraph.getExportsInfo(module);
183
184
  const relevantExports = exportsInfo.getRelevantExports(undefined);
184
185
  const unknownReexports = relevantExports.filter(
185
- exportInfo =>
186
+ (exportInfo) =>
186
187
  exportInfo.isReexport() && !exportInfo.getTarget(moduleGraph)
187
188
  );
188
189
  if (unknownReexports.length > 0) {
@@ -190,7 +191,7 @@ class ModuleConcatenationPlugin {
190
191
  module,
191
192
  `Reexports in this module do not have a static target (${Array.from(
192
193
  unknownReexports,
193
- exportInfo =>
194
+ (exportInfo) =>
194
195
  `${
195
196
  exportInfo.name || "other exports"
196
197
  }: ${exportInfo.getUsedInfo()}`
@@ -201,14 +202,14 @@ class ModuleConcatenationPlugin {
201
202
 
202
203
  // Root modules must have a static list of exports
203
204
  const unknownProvidedExports = relevantExports.filter(
204
- exportInfo => exportInfo.provided !== true
205
+ (exportInfo) => exportInfo.provided !== true
205
206
  );
206
207
  if (unknownProvidedExports.length > 0) {
207
208
  setBailoutReason(
208
209
  module,
209
210
  `List of module exports is dynamic (${Array.from(
210
211
  unknownProvidedExports,
211
- exportInfo =>
212
+ (exportInfo) =>
212
213
  `${
213
214
  exportInfo.name || "other exports"
214
215
  }: ${exportInfo.getProvidedInfo()} and ${exportInfo.getUsedInfo()}`
@@ -223,7 +224,7 @@ class ModuleConcatenationPlugin {
223
224
  canBeInner = false;
224
225
  }
225
226
 
226
- if (moduleGraph.isDeferred(module)) {
227
+ if (deferEnabled && moduleGraph.isDeferred(module)) {
227
228
  setInnerBailoutReason(module, "Module is deferred");
228
229
  canBeInner = false;
229
230
  }
@@ -277,7 +278,7 @@ class ModuleConcatenationPlugin {
277
278
  chunkRuntime = mergeRuntimeOwned(chunkRuntime, r);
278
279
  }
279
280
  const exportsInfo = moduleGraph.getExportsInfo(currentRoot);
280
- const filteredRuntime = filterRuntime(chunkRuntime, r =>
281
+ const filteredRuntime = filterRuntime(chunkRuntime, (r) =>
281
282
  exportsInfo.isModuleUsed(r)
282
283
  );
283
284
  const activeRuntime =
@@ -407,7 +408,7 @@ class ModuleConcatenationPlugin {
407
408
  (null),
408
409
  /** @type {EXPECTED_ANY} */
409
410
  (null),
410
- err => {
411
+ (err) => {
411
412
  if (err) {
412
413
  if (!err.module) {
413
414
  err.module = newModule;
@@ -441,7 +442,7 @@ class ModuleConcatenationPlugin {
441
442
  moduleGraph.copyOutgoingModuleConnections(
442
443
  m,
443
444
  newModule,
444
- c =>
445
+ (c) =>
445
446
  c.originModule === m &&
446
447
  !(
447
448
  c.dependency instanceof HarmonyImportDependency &&
@@ -477,14 +478,18 @@ class ModuleConcatenationPlugin {
477
478
  // remove module from chunk
478
479
  chunkGraph.replaceModule(rootModule, newModule);
479
480
  // replace module references with the concatenated module
480
- moduleGraph.moveModuleConnections(rootModule, newModule, c => {
481
- const otherModule =
482
- c.module === rootModule ? c.originModule : c.module;
483
- const innerConnection =
484
- c.dependency instanceof HarmonyImportDependency &&
485
- modules.has(/** @type {Module} */ (otherModule));
486
- return !innerConnection;
487
- });
481
+ moduleGraph.moveModuleConnections(
482
+ rootModule,
483
+ newModule,
484
+ (c) => {
485
+ const otherModule =
486
+ c.module === rootModule ? c.originModule : c.module;
487
+ const innerConnection =
488
+ c.dependency instanceof HarmonyImportDependency &&
489
+ modules.has(/** @type {Module} */ (otherModule));
490
+ return !innerConnection;
491
+ }
492
+ );
488
493
  // add concatenated module to the compilation
489
494
  compilation.modules.add(newModule);
490
495
 
@@ -493,7 +498,7 @@ class ModuleConcatenationPlugin {
493
498
 
494
499
  build();
495
500
  },
496
- err => {
501
+ (err) => {
497
502
  logger.timeEnd("create concatenated modules");
498
503
  process.nextTick(callback.bind(null, err));
499
504
  }
@@ -532,7 +537,7 @@ class ModuleConcatenationPlugin {
532
537
  );
533
538
 
534
539
  if (
535
- importedNames.every(i =>
540
+ importedNames.every((i) =>
536
541
  Array.isArray(i) ? i.length > 0 : i.name.length > 0
537
542
  ) ||
538
543
  Array.isArray(moduleGraph.getProvidedExports(module))
@@ -592,22 +597,22 @@ class ModuleConcatenationPlugin {
592
597
  // Module must be in the correct chunks
593
598
  const missingChunks = [
594
599
  ...chunkGraph.getModuleChunksIterable(config.rootModule)
595
- ].filter(chunk => !chunkGraph.isModuleInChunk(module, chunk));
600
+ ].filter((chunk) => !chunkGraph.isModuleInChunk(module, chunk));
596
601
  if (missingChunks.length > 0) {
597
602
  /**
598
603
  * @param {RequestShortener} requestShortener request shortener
599
604
  * @returns {string} problem description
600
605
  */
601
- const problem = requestShortener => {
606
+ const problem = (requestShortener) => {
602
607
  const missingChunksList = [
603
608
  ...new Set(
604
- missingChunks.map(chunk => chunk.name || "unnamed chunk(s)")
609
+ missingChunks.map((chunk) => chunk.name || "unnamed chunk(s)")
605
610
  )
606
611
  ].sort();
607
612
  const chunks = [
608
613
  ...new Set(
609
614
  [...chunkGraph.getModuleChunksIterable(module)].map(
610
- chunk => chunk.name || "unnamed chunk(s)"
615
+ (chunk) => chunk.name || "unnamed chunk(s)"
611
616
  )
612
617
  )
613
618
  ].sort();
@@ -631,7 +636,7 @@ class ModuleConcatenationPlugin {
631
636
  incomingConnections.get(null) || incomingConnections.get(undefined);
632
637
  if (incomingConnectionsFromNonModules) {
633
638
  const activeNonModulesConnections =
634
- incomingConnectionsFromNonModules.filter(connection =>
639
+ incomingConnectionsFromNonModules.filter((connection) =>
635
640
  // We are not interested in inactive connections
636
641
  // or connections without dependency
637
642
  connection.isActive(runtime)
@@ -641,9 +646,11 @@ class ModuleConcatenationPlugin {
641
646
  * @param {RequestShortener} requestShortener request shortener
642
647
  * @returns {string} problem description
643
648
  */
644
- const problem = requestShortener => {
649
+ const problem = (requestShortener) => {
645
650
  const importingExplanations = new Set(
646
- activeNonModulesConnections.map(c => c.explanation).filter(Boolean)
651
+ activeNonModulesConnections
652
+ .map((c) => c.explanation)
653
+ .filter(Boolean)
647
654
  );
648
655
  const explanations = [...importingExplanations].sort();
649
656
  return `Module ${module.readableIdentifier(
@@ -676,7 +683,7 @@ class ModuleConcatenationPlugin {
676
683
  if (!intersectRuntime(runtime, originRuntime)) continue;
677
684
 
678
685
  // We are not interested in inactive connections
679
- const activeConnections = connections.filter(connection =>
686
+ const activeConnections = connections.filter((connection) =>
680
687
  connection.isActive(runtime)
681
688
  );
682
689
  if (activeConnections.length > 0) {
@@ -688,7 +695,7 @@ class ModuleConcatenationPlugin {
688
695
  const incomingModules = [...incomingConnectionsFromModules.keys()];
689
696
 
690
697
  // Module must be in the same chunks like the referencing module
691
- const otherChunkModules = incomingModules.filter(originModule => {
698
+ const otherChunkModules = incomingModules.filter((originModule) => {
692
699
  for (const chunk of chunkGraph.getModuleChunksIterable(
693
700
  config.rootModule
694
701
  )) {
@@ -703,9 +710,9 @@ class ModuleConcatenationPlugin {
703
710
  * @param {RequestShortener} requestShortener request shortener
704
711
  * @returns {string} problem description
705
712
  */
706
- const problem = requestShortener => {
713
+ const problem = (requestShortener) => {
707
714
  const names = otherChunkModules
708
- .map(m => m.readableIdentifier(requestShortener))
715
+ .map((m) => m.readableIdentifier(requestShortener))
709
716
  .sort();
710
717
  return `Module ${module.readableIdentifier(
711
718
  requestShortener
@@ -722,7 +729,7 @@ class ModuleConcatenationPlugin {
722
729
  const nonHarmonyConnections = new Map();
723
730
  for (const [originModule, connections] of incomingConnectionsFromModules) {
724
731
  const selected = connections.filter(
725
- connection =>
732
+ (connection) =>
726
733
  !connection.dependency ||
727
734
  !(connection.dependency instanceof HarmonyImportDependency)
728
735
  );
@@ -735,7 +742,7 @@ class ModuleConcatenationPlugin {
735
742
  * @param {RequestShortener} requestShortener request shortener
736
743
  * @returns {string} problem description
737
744
  */
738
- const problem = requestShortener => {
745
+ const problem = (requestShortener) => {
739
746
  const names = [...nonHarmonyConnections]
740
747
  .map(
741
748
  ([originModule, connections]) =>
@@ -744,7 +751,7 @@ class ModuleConcatenationPlugin {
744
751
  )} (referenced with ${[
745
752
  ...new Set(
746
753
  connections
747
- .map(c => c.dependency && c.dependency.type)
754
+ .map((c) => c.dependency && c.dependency.type)
748
755
  .filter(Boolean)
749
756
  )
750
757
  ]
@@ -774,7 +781,7 @@ class ModuleConcatenationPlugin {
774
781
  /** @type {false | RuntimeSpec} */
775
782
  let currentRuntimeCondition = false;
776
783
  for (const connection of connections) {
777
- const runtimeCondition = filterRuntime(runtime, runtime =>
784
+ const runtimeCondition = filterRuntime(runtime, (runtime) =>
778
785
  connection.isTargetActive(runtime)
779
786
  );
780
787
  if (runtimeCondition === false) continue;
@@ -796,7 +803,7 @@ class ModuleConcatenationPlugin {
796
803
  * @param {RequestShortener} requestShortener request shortener
797
804
  * @returns {string} problem description
798
805
  */
799
- const problem = requestShortener =>
806
+ const problem = (requestShortener) =>
800
807
  `Module ${module.readableIdentifier(
801
808
  requestShortener
802
809
  )} is runtime-dependent referenced by these modules: ${Array.from(
@@ -61,7 +61,7 @@ const mapAndDeduplicateBuffers = (input, fn) => {
61
61
  * @param {string} str String to quote
62
62
  * @returns {string} Escaped string
63
63
  */
64
- const quoteMeta = str => str.replace(/[-[\]\\/{}()*+?.^$|]/g, "\\$&");
64
+ const quoteMeta = (str) => str.replace(/[-[\]\\/{}()*+?.^$|]/g, "\\$&");
65
65
 
66
66
  const cachedSourceMap = new WeakMap();
67
67
 
@@ -69,7 +69,7 @@ const cachedSourceMap = new WeakMap();
69
69
  * @param {Source} source source
70
70
  * @returns {CachedSource} cached source
71
71
  */
72
- const toCachedSource = source => {
72
+ const toCachedSource = (source) => {
73
73
  if (source instanceof CachedSource) {
74
74
  return source;
75
75
  }
@@ -150,7 +150,7 @@ class RealContentHashPlugin {
150
150
  * @returns {void}
151
151
  */
152
152
  apply(compiler) {
153
- compiler.hooks.compilation.tap(PLUGIN_NAME, compilation => {
153
+ compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
154
154
  const cacheAnalyse = compilation.getCache(
155
155
  "RealContentHashPlugin|analyse"
156
156
  );
@@ -205,7 +205,7 @@ class RealContentHashPlugin {
205
205
  "g"
206
206
  );
207
207
  await Promise.all(
208
- assetsWithInfo.map(async asset => {
208
+ assetsWithInfo.map(async (asset) => {
209
209
  const { name, source, content, hashes } = asset;
210
210
  if (Buffer.isBuffer(content)) {
211
211
  asset.referencedHashes = EMPTY_SET;
@@ -238,10 +238,10 @@ class RealContentHashPlugin {
238
238
  * @param {string} hash the hash
239
239
  * @returns {undefined | ReferencedHashes} the referenced hashes
240
240
  */
241
- const getDependencies = hash => {
241
+ const getDependencies = (hash) => {
242
242
  const assets = hashToAssets.get(hash);
243
243
  if (!assets) {
244
- const referencingAssets = assetsWithInfo.filter(asset =>
244
+ const referencingAssets = assetsWithInfo.filter((asset) =>
245
245
  /** @type {ReferencedHashes} */ (asset.referencedHashes).has(
246
246
  hash
247
247
  )
@@ -252,7 +252,7 @@ An asset was cached with a reference to another asset (${hash}) that's not in th
252
252
  Either the asset was incorrectly cached, or the referenced asset should also be restored from cache.
253
253
  Referenced by:
254
254
  ${referencingAssets
255
- .map(a => {
255
+ .map((a) => {
256
256
  const match = new RegExp(`.{0,20}${quoteMeta(hash)}.{0,20}`).exec(
257
257
  a.content
258
258
  );
@@ -281,11 +281,11 @@ ${referencingAssets
281
281
  * @param {string} hash the hash
282
282
  * @returns {string} the hash info
283
283
  */
284
- const hashInfo = hash => {
284
+ const hashInfo = (hash) => {
285
285
  const assets = hashToAssets.get(hash);
286
286
  return `${hash} (${Array.from(
287
287
  /** @type {AssetInfoForRealContentHash[]} */ (assets),
288
- a => a.name
288
+ (a) => a.name
289
289
  )})`;
290
290
  };
291
291
  /** @type {Set<string>} */
@@ -323,26 +323,26 @@ ${referencingAssets
323
323
  * @param {AssetInfoForRealContentHash} asset asset info
324
324
  * @returns {Etag} etag
325
325
  */
326
- const getEtag = asset =>
326
+ const getEtag = (asset) =>
327
327
  cacheGenerate.mergeEtags(
328
328
  cacheGenerate.getLazyHashedEtag(asset.source),
329
329
  Array.from(
330
330
  /** @type {ReferencedHashes} */ (asset.referencedHashes),
331
- hash => hashToNewHash.get(hash)
331
+ (hash) => hashToNewHash.get(hash)
332
332
  ).join("|")
333
333
  );
334
334
  /**
335
335
  * @param {AssetInfoForRealContentHash} asset asset info
336
336
  * @returns {Promise<void>}
337
337
  */
338
- const computeNewContent = asset => {
338
+ const computeNewContent = (asset) => {
339
339
  if (asset.contentComputePromise) return asset.contentComputePromise;
340
340
  return (asset.contentComputePromise = (async () => {
341
341
  if (
342
342
  /** @type {OwnHashes} */ (asset.ownHashes).size > 0 ||
343
343
  [
344
344
  .../** @type {ReferencedHashes} */ (asset.referencedHashes)
345
- ].some(hash => hashToNewHash.get(hash) !== hash)
345
+ ].some((hash) => hashToNewHash.get(hash) !== hash)
346
346
  ) {
347
347
  const identifier = asset.name;
348
348
  const etag = getEtag(asset);
@@ -352,7 +352,7 @@ ${referencingAssets
352
352
  () => {
353
353
  const newContent = asset.content.replace(
354
354
  hashRegExp,
355
- hash => /** @type {string} */ (hashToNewHash.get(hash))
355
+ (hash) => /** @type {string} */ (hashToNewHash.get(hash))
356
356
  );
357
357
  return new RawSource(newContent);
358
358
  }
@@ -364,7 +364,7 @@ ${referencingAssets
364
364
  * @param {AssetInfoForRealContentHash} asset asset info
365
365
  * @returns {Promise<void>}
366
366
  */
367
- const computeNewContentWithoutOwn = asset => {
367
+ const computeNewContentWithoutOwn = (asset) => {
368
368
  if (asset.contentComputeWithoutOwnPromise) {
369
369
  return asset.contentComputeWithoutOwnPromise;
370
370
  }
@@ -373,7 +373,7 @@ ${referencingAssets
373
373
  /** @type {OwnHashes} */ (asset.ownHashes).size > 0 ||
374
374
  [
375
375
  .../** @type {ReferencedHashes} */ (asset.referencedHashes)
376
- ].some(hash => hashToNewHash.get(hash) !== hash)
376
+ ].some((hash) => hashToNewHash.get(hash) !== hash)
377
377
  ) {
378
378
  const identifier = `${asset.name}|without-own`;
379
379
  const etag = getEtag(asset);
@@ -383,7 +383,7 @@ ${referencingAssets
383
383
  () => {
384
384
  const newContent = asset.content.replace(
385
385
  hashRegExp,
386
- hash => {
386
+ (hash) => {
387
387
  if (
388
388
  /** @type {OwnHashes} */
389
389
  (asset.ownHashes).has(hash)
@@ -399,20 +399,20 @@ ${referencingAssets
399
399
  }
400
400
  })());
401
401
  };
402
- const comparator = compareSelect(a => a.name, compareStrings);
402
+ const comparator = compareSelect((a) => a.name, compareStrings);
403
403
  for (const oldHash of hashesInOrder) {
404
404
  const assets =
405
405
  /** @type {AssetInfoForRealContentHash[]} */
406
406
  (hashToAssets.get(oldHash));
407
407
  assets.sort(comparator);
408
408
  await Promise.all(
409
- assets.map(asset =>
409
+ assets.map((asset) =>
410
410
  /** @type {OwnHashes} */ (asset.ownHashes).has(oldHash)
411
411
  ? computeNewContentWithoutOwn(asset)
412
412
  : computeNewContent(asset)
413
413
  )
414
414
  );
415
- const assetsContent = mapAndDeduplicateBuffers(assets, asset => {
415
+ const assetsContent = mapAndDeduplicateBuffers(assets, (asset) => {
416
416
  if (/** @type {OwnHashes} */ (asset.ownHashes).has(oldHash)) {
417
417
  return asset.newSourceWithoutOwn
418
418
  ? asset.newSourceWithoutOwn.buffer()
@@ -437,18 +437,18 @@ ${referencingAssets
437
437
  hashToNewHash.set(oldHash, newHash);
438
438
  }
439
439
  await Promise.all(
440
- assetsWithInfo.map(async asset => {
440
+ assetsWithInfo.map(async (asset) => {
441
441
  await computeNewContent(asset);
442
442
  const newName = asset.name.replace(
443
443
  hashRegExp,
444
- hash => /** @type {string} */ (hashToNewHash.get(hash))
444
+ (hash) => /** @type {string} */ (hashToNewHash.get(hash))
445
445
  );
446
446
 
447
447
  const infoUpdate = {};
448
448
  const hash = /** @type {string} */ (asset.info.contenthash);
449
449
  infoUpdate.contenthash = Array.isArray(hash)
450
450
  ? hash.map(
451
- hash => /** @type {string} */ (hashToNewHash.get(hash))
451
+ (hash) => /** @type {string} */ (hashToNewHash.get(hash))
452
452
  )
453
453
  : /** @type {string} */ (hashToNewHash.get(hash));
454
454
 
@@ -19,12 +19,12 @@ class RemoveEmptyChunksPlugin {
19
19
  * @returns {void}
20
20
  */
21
21
  apply(compiler) {
22
- compiler.hooks.compilation.tap(PLUGIN_NAME, compilation => {
22
+ compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
23
23
  /**
24
24
  * @param {Iterable<Chunk>} chunks the chunks array
25
25
  * @returns {void}
26
26
  */
27
- const handler = chunks => {
27
+ const handler = (chunks) => {
28
28
  const chunkGraph = compilation.chunkGraph;
29
29
  for (const chunk of chunks) {
30
30
  if (
@@ -67,7 +67,7 @@ class RemoveParentModulesPlugin {
67
67
  * @returns {void}
68
68
  */
69
69
  apply(compiler) {
70
- compiler.hooks.compilation.tap(PLUGIN_NAME, compilation => {
70
+ compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
71
71
  /**
72
72
  * @param {Iterable<Chunk>} chunks the chunks
73
73
  * @param {ChunkGroup[]} chunkGroups the chunk groups
@@ -87,7 +87,7 @@ class RemoveParentModulesPlugin {
87
87
  * @param {Module} mod the module to get the mask for
88
88
  * @returns {bigint} the module mask to uniquely identify the module
89
89
  */
90
- const getOrCreateModuleMask = mod => {
90
+ const getOrCreateModuleMask = (mod) => {
91
91
  let id = maskByModule.get(mod);
92
92
  if (id === undefined) {
93
93
  id = nextModuleMask;
@@ -177,7 +177,7 @@ class RemoveParentModulesPlugin {
177
177
 
178
178
  const availableModulesSets = Array.from(
179
179
  chunk.groupsIterable,
180
- chunkGroup => availableModulesMap.get(chunkGroup)
180
+ (chunkGroup) => availableModulesMap.get(chunkGroup)
181
181
  );
182
182
  if (availableModulesSets.includes(undefined)) continue; // No info about this chunk group
183
183
 
@@ -20,7 +20,7 @@ class RuntimeChunkPlugin {
20
20
  constructor(options) {
21
21
  this.options = {
22
22
  /** @type {RuntimeChunkFunction} */
23
- name: entrypoint => `runtime~${entrypoint.name}`,
23
+ name: (entrypoint) => `runtime~${entrypoint.name}`,
24
24
  ...options
25
25
  };
26
26
  }
@@ -31,7 +31,7 @@ class RuntimeChunkPlugin {
31
31
  * @returns {void}
32
32
  */
33
33
  apply(compiler) {
34
- compiler.hooks.thisCompilation.tap(PLUGIN_NAME, compilation => {
34
+ compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => {
35
35
  compilation.hooks.addEntry.tap(PLUGIN_NAME, (_, { name: entryName }) => {
36
36
  if (entryName === undefined) return;
37
37
  const data =
@@ -131,7 +131,7 @@ class SideEffectsFlagPlugin {
131
131
  * @param {JavascriptParser} parser the parser
132
132
  * @returns {void}
133
133
  */
134
- const parserHandler = parser => {
134
+ const parserHandler = (parser) => {
135
135
  /** @type {undefined | Statement | ModuleDeclaration | MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration} */
136
136
  let sideEffectsStatement;
137
137
  parser.hooks.program.tap(PLUGIN_NAME, () => {
@@ -139,7 +139,7 @@ class SideEffectsFlagPlugin {
139
139
  });
140
140
  parser.hooks.statement.tap(
141
141
  { name: PLUGIN_NAME, stage: -100 },
142
- statement => {
142
+ (statement) => {
143
143
  if (sideEffectsStatement) return;
144
144
  if (parser.scope.topLevelScope !== true) return;
145
145
  switch (statement.type) {
@@ -277,7 +277,7 @@ class SideEffectsFlagPlugin {
277
277
  name: PLUGIN_NAME,
278
278
  stage: STAGE_DEFAULT
279
279
  },
280
- modules => {
280
+ (modules) => {
281
281
  const logger = compilation.getLogger(
282
282
  "webpack.SideEffectsFlagPlugin"
283
283
  );
@@ -289,7 +289,7 @@ class SideEffectsFlagPlugin {
289
289
  /**
290
290
  * @param {Module} module module
291
291
  */
292
- const optimizeIncomingConnections = module => {
292
+ const optimizeIncomingConnections = (module) => {
293
293
  if (optimizedModules.has(module)) return;
294
294
  optimizedModules.add(module);
295
295
  if (module.getSideEffectsConnectionState(moduleGraph) === false) {
@@ -410,7 +410,7 @@ class SideEffectsFlagPlugin {
410
410
  case "string":
411
411
  return globToRegexp(flagValue, cache).test(moduleName);
412
412
  case "object":
413
- return flagValue.some(glob =>
413
+ return flagValue.some((glob) =>
414
414
  SideEffectsFlagPlugin.moduleHasSideEffects(moduleName, glob, cache)
415
415
  );
416
416
  }