webpack 5.101.3 → 5.102.1

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 (339) hide show
  1. package/README.md +21 -26
  2. package/lib/APIPlugin.js +30 -36
  3. package/lib/AsyncDependenciesBlock.js +1 -4
  4. package/lib/BannerPlugin.js +0 -1
  5. package/lib/Cache.js +7 -6
  6. package/lib/CacheFacade.js +0 -1
  7. package/lib/Chunk.js +49 -31
  8. package/lib/ChunkGraph.js +37 -27
  9. package/lib/ChunkGroup.js +8 -10
  10. package/lib/ChunkTemplate.js +1 -1
  11. package/lib/CleanPlugin.js +3 -3
  12. package/lib/CodeGenerationResults.js +3 -2
  13. package/lib/CompatibilityPlugin.js +29 -12
  14. package/lib/Compilation.js +209 -196
  15. package/lib/Compiler.js +36 -35
  16. package/lib/ConcatenationScope.js +6 -1
  17. package/lib/ConditionalInitFragment.js +1 -1
  18. package/lib/ConstPlugin.js +6 -5
  19. package/lib/ContextExclusionPlugin.js +0 -1
  20. package/lib/ContextModule.js +25 -21
  21. package/lib/ContextModuleFactory.js +30 -11
  22. package/lib/ContextReplacementPlugin.js +38 -15
  23. package/lib/DefinePlugin.js +5 -9
  24. package/lib/DelegatedModule.js +7 -11
  25. package/lib/DependenciesBlock.js +0 -2
  26. package/lib/Dependency.js +9 -11
  27. package/lib/DependencyTemplates.js +2 -4
  28. package/lib/DllModule.js +1 -7
  29. package/lib/DllReferencePlugin.js +2 -4
  30. package/lib/DynamicEntryPlugin.js +0 -2
  31. package/lib/EntryOptionPlugin.js +0 -5
  32. package/lib/EnvironmentNotSupportAsyncWarning.js +0 -3
  33. package/lib/EvalDevToolModulePlugin.js +4 -3
  34. package/lib/EvalSourceMapDevToolPlugin.js +3 -4
  35. package/lib/ExportsInfo.js +50 -49
  36. package/lib/ExternalModule.js +84 -52
  37. package/lib/ExternalModuleFactoryPlugin.js +27 -7
  38. package/lib/ExternalsPlugin.js +24 -17
  39. package/lib/FileSystemInfo.js +105 -90
  40. package/lib/FlagDependencyUsagePlugin.js +3 -4
  41. package/lib/Generator.js +2 -13
  42. package/lib/GraphHelpers.js +0 -3
  43. package/lib/HookWebpackError.js +0 -2
  44. package/lib/HotModuleReplacementPlugin.js +22 -24
  45. package/lib/HotUpdateChunk.js +0 -3
  46. package/lib/IgnorePlugin.js +5 -2
  47. package/lib/InitFragment.js +41 -29
  48. package/lib/InvalidDependenciesModuleWarning.js +0 -1
  49. package/lib/LibManifestPlugin.js +4 -6
  50. package/lib/LoaderOptionsPlugin.js +1 -10
  51. package/lib/MainTemplate.js +8 -19
  52. package/lib/Module.js +32 -20
  53. package/lib/ModuleFactory.js +1 -1
  54. package/lib/ModuleFilenameHelpers.js +42 -25
  55. package/lib/ModuleGraph.js +30 -16
  56. package/lib/ModuleInfoHeaderPlugin.js +0 -1
  57. package/lib/ModuleTemplate.js +0 -2
  58. package/lib/ModuleTypeConstants.js +11 -1
  59. package/lib/MultiCompiler.js +23 -15
  60. package/lib/MultiWatching.js +6 -10
  61. package/lib/NodeStuffPlugin.js +2 -10
  62. package/lib/NormalModule.js +146 -89
  63. package/lib/NormalModuleFactory.js +132 -42
  64. package/lib/OptionsApply.js +1 -1
  65. package/lib/Parser.js +1 -1
  66. package/lib/ProgressPlugin.js +6 -10
  67. package/lib/ProvidePlugin.js +5 -7
  68. package/lib/RawModule.js +1 -6
  69. package/lib/RecordIdsPlugin.js +10 -6
  70. package/lib/ResolverFactory.js +0 -2
  71. package/lib/RuntimeGlobals.js +5 -0
  72. package/lib/RuntimeModule.js +1 -3
  73. package/lib/RuntimePlugin.js +26 -22
  74. package/lib/RuntimeTemplate.js +22 -12
  75. package/lib/SourceMapDevToolModuleOptionsPlugin.js +2 -2
  76. package/lib/SourceMapDevToolPlugin.js +11 -18
  77. package/lib/Stats.js +0 -1
  78. package/lib/Template.js +6 -11
  79. package/lib/TemplatedPathPlugin.js +2 -1
  80. package/lib/WatchIgnorePlugin.js +2 -3
  81. package/lib/Watching.js +15 -15
  82. package/lib/WebpackIsIncludedPlugin.js +0 -2
  83. package/lib/WebpackOptionsApply.js +74 -107
  84. package/lib/asset/AssetBytesGenerator.js +167 -0
  85. package/lib/asset/AssetBytesParser.js +37 -0
  86. package/lib/asset/AssetGenerator.js +22 -37
  87. package/lib/asset/AssetModulesPlugin.js +34 -16
  88. package/lib/asset/AssetParser.js +7 -3
  89. package/lib/asset/AssetSourceGenerator.js +1 -1
  90. package/lib/asset/RawDataUrlModule.js +3 -2
  91. package/lib/async-modules/AsyncModuleHelpers.js +6 -4
  92. package/lib/buildChunkGraph.js +0 -1
  93. package/lib/cache/MemoryCachePlugin.js +0 -2
  94. package/lib/cache/MemoryWithGcCachePlugin.js +0 -2
  95. package/lib/cache/PackFileCacheStrategy.js +14 -1
  96. package/lib/cache/ResolverCachePlugin.js +9 -15
  97. package/lib/cache/getLazyHashedEtag.js +1 -1
  98. package/lib/config/browserslistTargetHandler.js +77 -76
  99. package/lib/config/defaults.js +162 -23
  100. package/lib/config/normalization.js +18 -3
  101. package/lib/config/target.js +1 -1
  102. package/lib/container/ContainerEntryDependency.js +0 -1
  103. package/lib/container/ContainerEntryModule.js +3 -7
  104. package/lib/container/ContainerPlugin.js +1 -2
  105. package/lib/container/ContainerReferencePlugin.js +0 -1
  106. package/lib/container/FallbackDependency.js +2 -1
  107. package/lib/container/FallbackModule.js +6 -7
  108. package/lib/container/ModuleFederationPlugin.js +0 -1
  109. package/lib/container/RemoteModule.js +8 -8
  110. package/lib/container/RemoteRuntimeModule.js +2 -2
  111. package/lib/css/CssGenerator.js +3 -6
  112. package/lib/css/CssLoadingRuntimeModule.js +6 -9
  113. package/lib/css/CssModulesPlugin.js +13 -19
  114. package/lib/css/CssParser.js +3 -3
  115. package/lib/css/walkCssTokens.js +2 -2
  116. package/lib/debug/ProfilingPlugin.js +35 -8
  117. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +12 -17
  118. package/lib/dependencies/AMDPlugin.js +2 -2
  119. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +1 -2
  120. package/lib/dependencies/CachedConstDependency.js +0 -4
  121. package/lib/dependencies/CommonJsExportRequireDependency.js +20 -14
  122. package/lib/dependencies/CommonJsExportsDependency.js +2 -1
  123. package/lib/dependencies/CommonJsExportsParserPlugin.js +20 -5
  124. package/lib/dependencies/CommonJsFullRequireDependency.js +6 -4
  125. package/lib/dependencies/CommonJsImportsParserPlugin.js +16 -7
  126. package/lib/dependencies/CommonJsRequireContextDependency.js +1 -1
  127. package/lib/dependencies/CommonJsSelfReferenceDependency.js +4 -4
  128. package/lib/dependencies/ConstDependency.js +2 -2
  129. package/lib/dependencies/ContextDependency.js +9 -4
  130. package/lib/dependencies/ContextDependencyHelpers.js +2 -2
  131. package/lib/dependencies/ContextDependencyTemplateAsId.js +9 -9
  132. package/lib/dependencies/ContextDependencyTemplateAsRequireCall.js +9 -9
  133. package/lib/dependencies/ContextElementDependency.js +22 -11
  134. package/lib/dependencies/CssIcssImportDependency.js +0 -2
  135. package/lib/dependencies/CssIcssSymbolDependency.js +2 -2
  136. package/lib/dependencies/CssImportDependency.js +0 -8
  137. package/lib/dependencies/CssLocalIdentifierDependency.js +4 -7
  138. package/lib/dependencies/CssSelfLocalIdentifierDependency.js +2 -2
  139. package/lib/dependencies/CssUrlDependency.js +0 -6
  140. package/lib/dependencies/ExportsInfoDependency.js +7 -9
  141. package/lib/dependencies/ExternalModuleDependency.js +0 -3
  142. package/lib/dependencies/ExternalModuleInitFragment.js +1 -1
  143. package/lib/dependencies/HarmonyAcceptDependency.js +1 -1
  144. package/lib/dependencies/HarmonyAcceptImportDependency.js +0 -4
  145. package/lib/dependencies/HarmonyCompatibilityDependency.js +0 -1
  146. package/lib/dependencies/HarmonyDetectionParserPlugin.js +0 -14
  147. package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +3 -3
  148. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +4 -1
  149. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +29 -35
  150. package/lib/dependencies/HarmonyImportDependency.js +33 -14
  151. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +20 -23
  152. package/lib/dependencies/HarmonyImportSideEffectDependency.js +0 -4
  153. package/lib/dependencies/HarmonyImportSpecifierDependency.js +46 -31
  154. package/lib/dependencies/HarmonyModulesPlugin.js +3 -3
  155. package/lib/dependencies/ImportContextDependency.js +13 -0
  156. package/lib/dependencies/ImportDependency.js +18 -6
  157. package/lib/dependencies/ImportEagerDependency.js +2 -3
  158. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +8 -5
  159. package/lib/dependencies/ImportMetaContextPlugin.js +0 -1
  160. package/lib/dependencies/ImportMetaPlugin.js +3 -2
  161. package/lib/dependencies/ImportParserPlugin.js +288 -45
  162. package/lib/dependencies/ImportWeakDependency.js +2 -3
  163. package/lib/dependencies/JsonExportsDependency.js +0 -1
  164. package/lib/dependencies/LoaderDependency.js +0 -3
  165. package/lib/dependencies/LoaderImportDependency.js +0 -3
  166. package/lib/dependencies/LoaderPlugin.js +11 -5
  167. package/lib/dependencies/ModuleDecoratorDependency.js +2 -4
  168. package/lib/dependencies/ModuleDependency.js +3 -9
  169. package/lib/dependencies/NullDependency.js +2 -0
  170. package/lib/dependencies/ProvidedDependency.js +6 -8
  171. package/lib/dependencies/PureExpressionDependency.js +0 -1
  172. package/lib/dependencies/RequireEnsureDependenciesBlock.js +0 -1
  173. package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +1 -2
  174. package/lib/dependencies/RequireIncludeDependency.js +2 -2
  175. package/lib/dependencies/RequireResolveDependency.js +2 -2
  176. package/lib/dependencies/RuntimeRequirementsDependency.js +2 -3
  177. package/lib/dependencies/StaticExportsDependency.js +3 -5
  178. package/lib/dependencies/URLDependency.js +2 -7
  179. package/lib/dependencies/URLPlugin.js +1 -2
  180. package/lib/dependencies/WebAssemblyExportImportedDependency.js +2 -2
  181. package/lib/dependencies/WebAssemblyImportDependency.js +2 -2
  182. package/lib/dependencies/WebpackIsIncludedDependency.js +2 -3
  183. package/lib/dependencies/WorkerDependency.js +2 -3
  184. package/lib/dependencies/WorkerPlugin.js +4 -12
  185. package/lib/dependencies/processExportInfo.js +2 -3
  186. package/lib/esm/ModuleChunkFormatPlugin.js +0 -3
  187. package/lib/esm/ModuleChunkLoadingPlugin.js +2 -1
  188. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +7 -7
  189. package/lib/hmr/LazyCompilationPlugin.js +6 -4
  190. package/lib/hmr/lazyCompilationBackend.js +13 -10
  191. package/lib/ids/DeterministicChunkIdsPlugin.js +0 -1
  192. package/lib/ids/HashedModuleIdsPlugin.js +5 -7
  193. package/lib/ids/IdHelpers.js +1 -1
  194. package/lib/ids/NamedChunkIdsPlugin.js +1 -6
  195. package/lib/ids/NamedModuleIdsPlugin.js +1 -5
  196. package/lib/ids/NaturalChunkIdsPlugin.js +0 -1
  197. package/lib/ids/NaturalModuleIdsPlugin.js +0 -1
  198. package/lib/ids/OccurrenceChunkIdsPlugin.js +0 -1
  199. package/lib/ids/OccurrenceModuleIdsPlugin.js +0 -1
  200. package/lib/ids/SyncModuleIdsPlugin.js +4 -3
  201. package/lib/index.js +8 -7
  202. package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +4 -1
  203. package/lib/javascript/BasicEvaluatedExpression.js +13 -6
  204. package/lib/javascript/ChunkFormatHelpers.js +1 -1
  205. package/lib/javascript/CommonJsChunkFormatPlugin.js +0 -1
  206. package/lib/javascript/JavascriptGenerator.js +2 -3
  207. package/lib/javascript/JavascriptModulesPlugin.js +46 -24
  208. package/lib/javascript/JavascriptParser.js +120 -55
  209. package/lib/javascript/JavascriptParserHelpers.js +2 -2
  210. package/lib/javascript/StartupHelpers.js +2 -4
  211. package/lib/json/JsonData.js +1 -1
  212. package/lib/json/JsonGenerator.js +4 -5
  213. package/lib/json/JsonModulesPlugin.js +0 -3
  214. package/lib/json/JsonParser.js +4 -2
  215. package/lib/library/AbstractLibraryPlugin.js +2 -2
  216. package/lib/library/AmdLibraryPlugin.js +0 -1
  217. package/lib/library/AssignLibraryPlugin.js +23 -12
  218. package/lib/library/EnableLibraryPlugin.js +7 -11
  219. package/lib/library/ExportPropertyLibraryPlugin.js +8 -20
  220. package/lib/library/JsonpLibraryPlugin.js +5 -2
  221. package/lib/library/ModuleLibraryPlugin.js +88 -43
  222. package/lib/library/SystemLibraryPlugin.js +15 -6
  223. package/lib/library/UmdLibraryPlugin.js +12 -18
  224. package/lib/logging/Logger.js +12 -10
  225. package/lib/logging/createConsoleLogger.js +15 -14
  226. package/lib/logging/truncateArgs.js +1 -1
  227. package/lib/node/CommonJsChunkLoadingPlugin.js +2 -1
  228. package/lib/node/NodeWatchFileSystem.js +4 -4
  229. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +2 -2
  230. package/lib/node/RequireChunkLoadingRuntimeModule.js +5 -2
  231. package/lib/node/nodeConsole.js +2 -2
  232. package/lib/optimize/AggressiveSplittingPlugin.js +2 -0
  233. package/lib/optimize/ConcatenatedModule.js +142 -100
  234. package/lib/optimize/InnerGraph.js +17 -11
  235. package/lib/optimize/InnerGraphPlugin.js +0 -3
  236. package/lib/optimize/ModuleConcatenationPlugin.js +3 -4
  237. package/lib/optimize/RealContentHashPlugin.js +5 -3
  238. package/lib/optimize/RuntimeChunkPlugin.js +0 -1
  239. package/lib/optimize/SideEffectsFlagPlugin.js +3 -10
  240. package/lib/optimize/SplitChunksPlugin.js +46 -40
  241. package/lib/performance/SizeLimitsPlugin.js +2 -1
  242. package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +5 -7
  243. package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +0 -2
  244. package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +0 -1
  245. package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +2 -2
  246. package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +2 -2
  247. package/lib/rules/BasicMatcherRulePlugin.js +0 -2
  248. package/lib/rules/ObjectMatcherRulePlugin.js +0 -1
  249. package/lib/rules/RuleSetCompiler.js +8 -6
  250. package/lib/runtime/BaseUriRuntimeModule.js +2 -2
  251. package/lib/runtime/CompatRuntimeModule.js +0 -1
  252. package/lib/runtime/GetChunkFilenameRuntimeModule.js +8 -9
  253. package/lib/runtime/LoadScriptRuntimeModule.js +0 -2
  254. package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +1 -1
  255. package/lib/runtime/PublicPathRuntimeModule.js +2 -2
  256. package/lib/runtime/StartupEntrypointRuntimeModule.js +0 -1
  257. package/lib/runtime/SystemContextRuntimeModule.js +0 -2
  258. package/lib/runtime/ToBinaryRuntimeModule.js +64 -0
  259. package/lib/schemes/DataUriPlugin.js +2 -28
  260. package/lib/schemes/FileUriPlugin.js +5 -2
  261. package/lib/schemes/HttpUriPlugin.js +4 -2
  262. package/lib/schemes/VirtualUrlPlugin.js +11 -11
  263. package/lib/serialization/FileMiddleware.js +1 -1
  264. package/lib/serialization/NullPrototypeObjectSerializer.js +5 -3
  265. package/lib/serialization/ObjectMiddleware.js +31 -20
  266. package/lib/serialization/SerializerMiddleware.js +1 -3
  267. package/lib/serialization/types.js +1 -1
  268. package/lib/sharing/ConsumeSharedModule.js +3 -5
  269. package/lib/sharing/ConsumeSharedPlugin.js +2 -4
  270. package/lib/sharing/ConsumeSharedRuntimeModule.js +9 -6
  271. package/lib/sharing/ProvideSharedModule.js +3 -7
  272. package/lib/sharing/SharePlugin.js +0 -2
  273. package/lib/sharing/ShareRuntimeModule.js +4 -1
  274. package/lib/sharing/resolveMatchedConfigs.js +14 -6
  275. package/lib/sharing/utils.js +0 -6
  276. package/lib/stats/DefaultStatsFactoryPlugin.js +179 -95
  277. package/lib/stats/DefaultStatsPresetPlugin.js +15 -9
  278. package/lib/stats/DefaultStatsPrinterPlugin.js +77 -113
  279. package/lib/stats/StatsFactory.js +14 -11
  280. package/lib/url/URLParserPlugin.js +2 -4
  281. package/lib/util/ArrayHelpers.js +4 -4
  282. package/lib/util/AsyncQueue.js +1 -0
  283. package/lib/util/Hash.js +35 -5
  284. package/lib/util/LazySet.js +2 -2
  285. package/lib/util/StackedCacheMap.js +0 -2
  286. package/lib/util/TupleSet.js +9 -4
  287. package/lib/util/URLAbsoluteSpecifier.js +0 -1
  288. package/lib/util/WeakTupleMap.js +1 -1
  289. package/lib/util/chainedImports.js +3 -1
  290. package/lib/util/cleverMerge.js +15 -18
  291. package/lib/util/comparators.js +2 -4
  292. package/lib/util/compileBooleanMatcher.js +11 -9
  293. package/lib/util/concatenate.js +1 -2
  294. package/lib/util/create-schema-validation.js +1 -2
  295. package/lib/util/createHash.js +85 -15
  296. package/lib/util/dataURL.js +39 -0
  297. package/lib/util/deprecation.js +29 -31
  298. package/lib/util/deterministicGrouping.js +34 -30
  299. package/lib/util/extractSourceMap.js +319 -0
  300. package/lib/util/findGraphRoots.js +15 -5
  301. package/lib/util/fs.js +29 -8
  302. package/lib/util/hash/BatchedHash.js +47 -8
  303. package/lib/util/hash/wasm-hash.js +53 -13
  304. package/lib/util/semver.js +9 -8
  305. package/lib/util/smartGrouping.js +41 -26
  306. package/lib/util/traverseDestructuringAssignmentProperties.js +45 -0
  307. package/lib/wasm/EnableWasmLoadingPlugin.js +3 -2
  308. package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +5 -1
  309. package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +2 -13
  310. package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +2 -9
  311. package/lib/wasm-async/AsyncWebAssemblyParser.js +2 -10
  312. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +6 -4
  313. package/lib/wasm-sync/WebAssemblyGenerator.js +1 -3
  314. package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +1 -4
  315. package/lib/wasm-sync/WebAssemblyModulesPlugin.js +2 -7
  316. package/lib/wasm-sync/WebAssemblyParser.js +1 -13
  317. package/lib/web/JsonpChunkLoadingPlugin.js +2 -1
  318. package/lib/web/JsonpChunkLoadingRuntimeModule.js +1 -1
  319. package/lib/web/JsonpTemplatePlugin.js +0 -1
  320. package/lib/webpack.js +21 -8
  321. package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +2 -1
  322. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +1 -1
  323. package/package.json +21 -21
  324. package/schemas/WebpackOptions.check.js +1 -1
  325. package/schemas/WebpackOptions.json +93 -96
  326. package/schemas/plugins/BannerPlugin.check.js +1 -1
  327. package/schemas/plugins/BannerPlugin.json +4 -0
  328. package/schemas/plugins/IgnorePlugin.json +1 -1
  329. package/schemas/plugins/ProgressPlugin.json +1 -1
  330. package/schemas/plugins/SourceMapDevToolPlugin.check.js +1 -1
  331. package/schemas/plugins/SourceMapDevToolPlugin.json +5 -1
  332. package/schemas/plugins/ids/HashedModuleIdsPlugin.check.d.ts +7 -0
  333. package/schemas/plugins/ids/HashedModuleIdsPlugin.check.js +6 -0
  334. package/schemas/plugins/{HashedModuleIdsPlugin.json → ids/HashedModuleIdsPlugin.json} +15 -2
  335. package/schemas/plugins/schemes/VirtualUrlPlugin.json +3 -3
  336. package/types.d.ts +1699 -706
  337. package/SECURITY.md +0 -9
  338. package/schemas/plugins/HashedModuleIdsPlugin.check.d.ts +0 -7
  339. package/schemas/plugins/HashedModuleIdsPlugin.check.js +0 -6
@@ -7,22 +7,19 @@
7
7
 
8
8
  const {
9
9
  ASSET_MODULE_TYPE,
10
+ ASSET_MODULE_TYPE_BYTES,
10
11
  ASSET_MODULE_TYPE_INLINE,
11
12
  ASSET_MODULE_TYPE_RESOURCE,
12
13
  ASSET_MODULE_TYPE_SOURCE
13
14
  } = require("../ModuleTypeConstants");
14
- const { cleverMerge } = require("../util/cleverMerge");
15
15
  const { compareModulesByIdOrIdentifier } = require("../util/comparators");
16
16
  const createSchemaValidation = require("../util/create-schema-validation");
17
17
  const memoize = require("../util/memoize");
18
18
 
19
19
  /** @typedef {import("webpack-sources").Source} Source */
20
- /** @typedef {import("../../declarations/WebpackOptions").AssetParserOptions} AssetParserOptions */
21
20
  /** @typedef {import("schema-utils").Schema} Schema */
22
- /** @typedef {import("../Chunk")} Chunk */
23
21
  /** @typedef {import("../Compilation").AssetInfo} AssetInfo */
24
22
  /** @typedef {import("../Compiler")} Compiler */
25
- /** @typedef {import("../Module")} Module */
26
23
  /** @typedef {import("../Module").BuildInfo} BuildInfo */
27
24
  /** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */
28
25
  /** @typedef {import("../NormalModule")} NormalModule */
@@ -74,9 +71,11 @@ const validateParserOptions = createSchemaValidation(
74
71
  const getAssetGenerator = memoize(() => require("./AssetGenerator"));
75
72
  const getAssetParser = memoize(() => require("./AssetParser"));
76
73
  const getAssetSourceParser = memoize(() => require("./AssetSourceParser"));
74
+ const getAssetBytesParser = memoize(() => require("./AssetBytesParser"));
77
75
  const getAssetSourceGenerator = memoize(() =>
78
76
  require("./AssetSourceGenerator")
79
77
  );
78
+ const getAssetBytesGenerator = memoize(() => require("./AssetBytesGenerator"));
80
79
 
81
80
  const type = ASSET_MODULE_TYPE;
82
81
  const PLUGIN_NAME = "AssetModulesPlugin";
@@ -95,11 +94,6 @@ class AssetModulesPlugin {
95
94
  .for(ASSET_MODULE_TYPE)
96
95
  .tap(PLUGIN_NAME, (parserOptions) => {
97
96
  validateParserOptions(parserOptions);
98
- parserOptions = cleverMerge(
99
- /** @type {AssetParserOptions} */
100
- (compiler.options.module.parser.asset),
101
- parserOptions
102
- );
103
97
 
104
98
  let dataUrlCondition = parserOptions.dataUrlCondition;
105
99
  if (!dataUrlCondition || typeof dataUrlCondition === "object") {
@@ -134,6 +128,13 @@ class AssetModulesPlugin {
134
128
 
135
129
  return new AssetSourceParser();
136
130
  });
131
+ normalModuleFactory.hooks.createParser
132
+ .for(ASSET_MODULE_TYPE_BYTES)
133
+ .tap(PLUGIN_NAME, (_parserOptions) => {
134
+ const AssetBytesParser = getAssetBytesParser();
135
+
136
+ return new AssetBytesParser();
137
+ });
137
138
 
138
139
  for (const type of [
139
140
  ASSET_MODULE_TYPE,
@@ -186,6 +187,14 @@ class AssetModulesPlugin {
186
187
  return new AssetSourceGenerator(compilation.moduleGraph);
187
188
  });
188
189
 
190
+ normalModuleFactory.hooks.createGenerator
191
+ .for(ASSET_MODULE_TYPE_BYTES)
192
+ .tap(PLUGIN_NAME, () => {
193
+ const AssetBytesGenerator = getAssetBytesGenerator();
194
+
195
+ return new AssetBytesGenerator(compilation.moduleGraph);
196
+ });
197
+
189
198
  compilation.hooks.renderManifest.tap(PLUGIN_NAME, (result, options) => {
190
199
  const { chunkGraph } = compilation;
191
200
  const { chunk, codeGenerationResults, runtimeTemplate } = options;
@@ -245,10 +254,15 @@ class AssetModulesPlugin {
245
254
  entryInfo = assetInfo;
246
255
  entryHash = fullContentHash;
247
256
  } else {
248
- entryFilename = buildInfo.filename || data.get("filename");
249
- entryInfo = buildInfo.assetInfo || data.get("assetInfo");
257
+ entryFilename =
258
+ /** @type {string} */
259
+ (buildInfo.filename || data.get("filename"));
260
+ entryInfo =
261
+ /** @type {AssetInfo} */
262
+ (buildInfo.assetInfo || data.get("assetInfo"));
250
263
  entryHash =
251
- buildInfo.fullContentHash || data.get("fullContentHash");
264
+ /** @type {string} */
265
+ (buildInfo.fullContentHash || data.get("fullContentHash"));
252
266
  }
253
267
 
254
268
  result.push({
@@ -280,10 +294,14 @@ class AssetModulesPlugin {
280
294
  const data =
281
295
  /** @type {NonNullable<CodeGenerationResult["data"]>} */
282
296
  (codeGenerationResult.data);
283
- context.assets.set(data.get("filename"), {
284
- source,
285
- info: data.get("assetInfo")
286
- });
297
+ context.assets.set(
298
+ /** @type {string} */
299
+ (data.get("filename")),
300
+ {
301
+ source,
302
+ info: data.get("assetInfo")
303
+ }
304
+ );
287
305
  }
288
306
  );
289
307
  }
@@ -33,15 +33,19 @@ class AssetParser extends Parser {
33
33
  throw new Error("AssetParser doesn't accept preparsed AST");
34
34
  }
35
35
 
36
- const buildInfo = /** @type {BuildInfo} */ (state.module.buildInfo);
36
+ const buildInfo =
37
+ /** @type {BuildInfo} */
38
+ (state.module.buildInfo);
37
39
  buildInfo.strict = true;
38
- const buildMeta = /** @type {BuildMeta} */ (state.module.buildMeta);
40
+ const buildMeta =
41
+ /** @type {BuildMeta} */
42
+ (state.module.buildMeta);
39
43
  buildMeta.exportsType = "default";
40
44
  buildMeta.defaultObject = false;
41
45
 
42
46
  if (typeof this.dataUrlCondition === "function") {
43
47
  buildInfo.dataUrl = this.dataUrlCondition(source, {
44
- filename: state.module.matchResource || state.module.resource,
48
+ filename: /** @type {string} */ (state.module.getResource()),
45
49
  module: state.module
46
50
  });
47
51
  } else if (typeof this.dataUrlCondition === "boolean") {
@@ -60,7 +60,7 @@ class AssetSourceGenerator extends Generator {
60
60
  concatenationScope.registerNamespaceExport(
61
61
  ConcatenationScope.NAMESPACE_OBJECT_EXPORT
62
62
  );
63
- sourceContent = `${runtimeTemplate.supportsConst() ? "const" : "var"} ${
63
+ sourceContent = `${runtimeTemplate.renderConst()} ${
64
64
  ConcatenationScope.NAMESPACE_OBJECT_EXPORT
65
65
  } = ${JSON.stringify(encodedSource)};`;
66
66
  } else {
@@ -12,10 +12,11 @@ const { ASSET_MODULE_TYPE_RAW_DATA_URL } = require("../ModuleTypeConstants");
12
12
  const RuntimeGlobals = require("../RuntimeGlobals");
13
13
  const makeSerializable = require("../util/makeSerializable");
14
14
 
15
- /** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */
15
+ /** @typedef {import("../config/defaults").WebpackOptionsNormalizedWithDefaults} WebpackOptions */
16
16
  /** @typedef {import("../Compilation")} Compilation */
17
17
  /** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */
18
18
  /** @typedef {import("../Module").BuildCallback} BuildCallback */
19
+ /** @typedef {import("../Module").RuntimeRequirements} RuntimeRequirements */
19
20
  /** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */
20
21
  /** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */
21
22
  /** @typedef {import("../Module").NeedBuildCallback} NeedBuildCallback */
@@ -23,7 +24,6 @@ const makeSerializable = require("../util/makeSerializable");
23
24
  /** @typedef {import("../Module").SourceTypes} SourceTypes */
24
25
  /** @typedef {import("../RequestShortener")} RequestShortener */
25
26
  /** @typedef {import("../ResolverFactory").ResolverWithOptions} ResolverWithOptions */
26
- /** @typedef {import("../WebpackError")} WebpackError */
27
27
  /** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
28
28
  /** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
29
29
  /** @typedef {import("../util/Hash")} Hash */
@@ -120,6 +120,7 @@ class RawDataUrlModule extends Module {
120
120
  data.set("url", {
121
121
  javascript: this.url
122
122
  });
123
+ /** @type {RuntimeRequirements} */
123
124
  const runtimeRequirements = new Set();
124
125
  runtimeRequirements.add(RuntimeGlobals.module);
125
126
  return { sources, runtimeRequirements, data };
@@ -10,17 +10,19 @@ const HarmonyImportDependency = require("../dependencies/HarmonyImportDependency
10
10
  /** @typedef {import("../ModuleGraph")} ModuleGraph */
11
11
  /** @typedef {import("../Module")} Module */
12
12
 
13
+ /** @typedef {Set<Module>} Modules */
14
+
13
15
  /**
14
16
  * @param {ModuleGraph} moduleGraph module graph
15
17
  * @param {Module} module module
16
- * @returns {Set<Module>} set of modules
18
+ * @returns {Modules} set of modules
17
19
  */
18
20
  const getOutgoingAsyncModules = (moduleGraph, module) => {
19
- /** @type {Set<Module>} */
21
+ /** @type {Modules} */
20
22
  const set = new Set();
21
- /** @type {Set<Module>} */
23
+ /** @type {Modules} */
22
24
  const seen = new Set();
23
- (function g(/** @type {Module} */ module) {
25
+ (function g(module) {
24
26
  if (!moduleGraph.isAsync(module) || seen.has(module)) return;
25
27
  seen.add(module);
26
28
  if (module.buildMeta && module.buildMeta.async) {
@@ -15,7 +15,6 @@ const { getEntryRuntime, mergeRuntime } = require("./util/runtime");
15
15
  /** @typedef {import("./ChunkGroup")} ChunkGroup */
16
16
  /** @typedef {import("./Compilation")} Compilation */
17
17
  /** @typedef {import("./DependenciesBlock")} DependenciesBlock */
18
- /** @typedef {import("./Dependency")} Dependency */
19
18
  /** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */
20
19
  /** @typedef {import("./Entrypoint")} Entrypoint */
21
20
  /** @typedef {import("./Module")} Module */
@@ -7,11 +7,9 @@
7
7
 
8
8
  const Cache = require("../Cache");
9
9
 
10
- /** @typedef {import("webpack-sources").Source} Source */
11
10
  /** @typedef {import("../Cache").Data} Data */
12
11
  /** @typedef {import("../Cache").Etag} Etag */
13
12
  /** @typedef {import("../Compiler")} Compiler */
14
- /** @typedef {import("../Module")} Module */
15
13
 
16
14
  class MemoryCachePlugin {
17
15
  /**
@@ -7,11 +7,9 @@
7
7
 
8
8
  const Cache = require("../Cache");
9
9
 
10
- /** @typedef {import("webpack-sources").Source} Source */
11
10
  /** @typedef {import("../Cache").Data} Data */
12
11
  /** @typedef {import("../Cache").Etag} Etag */
13
12
  /** @typedef {import("../Compiler")} Compiler */
14
- /** @typedef {import("../Module")} Module */
15
13
 
16
14
  /**
17
15
  * @typedef {object} MemoryWithGcCachePluginOptions
@@ -51,11 +51,17 @@ class PackContainer {
51
51
  resolveResults,
52
52
  resolveBuildDependenciesSnapshot
53
53
  ) {
54
+ /** @type {Pack | (() => Pack) } */
54
55
  this.data = data;
56
+ /** @type {string} */
55
57
  this.version = version;
58
+ /** @type {Snapshot} */
56
59
  this.buildSnapshot = buildSnapshot;
60
+ /** @type {BuildDependencies} */
57
61
  this.buildDependencies = buildDependencies;
62
+ /** @type {ResolveResults} */
58
63
  this.resolveResults = resolveResults;
64
+ /** @type {Snapshot} */
59
65
  this.resolveBuildDependenciesSnapshot = resolveBuildDependenciesSnapshot;
60
66
  }
61
67
 
@@ -104,10 +110,15 @@ class PackItemInfo {
104
110
  * @param {Data} value fresh value of item
105
111
  */
106
112
  constructor(identifier, etag, value) {
113
+ /** @type {string} */
107
114
  this.identifier = identifier;
115
+ /** @type {string | null | undefined} */
108
116
  this.etag = etag;
117
+ /** @type {number} */
109
118
  this.location = -1;
119
+ /** @type {number} */
110
120
  this.lastAccess = Date.now();
121
+ /** @type {Data} */
111
122
  this.freshValue = value;
112
123
  }
113
124
  }
@@ -1285,7 +1296,9 @@ class PackFileCacheStrategy {
1285
1296
  logger.timeEnd("check build dependencies");
1286
1297
  if (buildSnapshotValid && resolveValid) {
1287
1298
  logger.time("restore cache content metadata");
1288
- const d = /** @type {TODO} */ (packContainer).data();
1299
+ const d =
1300
+ /** @type {() => Pack} */
1301
+ (packContainer.data)();
1289
1302
  logger.timeEnd("restore cache content metadata");
1290
1303
  return d;
1291
1304
  }
@@ -26,10 +26,7 @@ const makeSerializable = require("../util/makeSerializable");
26
26
  * @typedef {import("tapable").SyncHook<T>} SyncHook
27
27
  */
28
28
 
29
- /**
30
- * @template H
31
- * @typedef {import("tapable").HookMapInterceptor<H>} HookMapInterceptor
32
- */
29
+ /** @typedef {Set<string>} Dependencies */
33
30
 
34
31
  class CacheEntry {
35
32
  /**
@@ -163,11 +160,8 @@ class ResolverCachePlugin {
163
160
  const newResolveContext = {
164
161
  ...resolveContext,
165
162
  stack: new Set(),
166
- /** @type {LazySet<string>} */
167
163
  missingDependencies: new LazySet(),
168
- /** @type {LazySet<string>} */
169
164
  fileDependencies: new LazySet(),
170
- /** @type {LazySet<string>} */
171
165
  contextDependencies: new LazySet()
172
166
  };
173
167
  /** @type {ResolveRequest[] | undefined} */
@@ -186,8 +180,8 @@ class ResolverCachePlugin {
186
180
  const propagate = (key) => {
187
181
  if (resolveContext[key]) {
188
182
  addAllToSet(
189
- /** @type {Set<string>} */ (resolveContext[key]),
190
- /** @type {Set<string>} */ (newResolveContext[key])
183
+ /** @type {Dependencies} */ (resolveContext[key]),
184
+ /** @type {Dependencies} */ (newResolveContext[key])
191
185
  );
192
186
  }
193
187
  };
@@ -207,11 +201,11 @@ class ResolverCachePlugin {
207
201
  const missingDependencies = newResolveContext.missingDependencies;
208
202
  fileSystemInfo.createSnapshot(
209
203
  resolveTime,
210
- /** @type {Set<string>} */
204
+ /** @type {Dependencies} */
211
205
  (fileDependencies),
212
- /** @type {Set<string>} */
206
+ /** @type {Dependencies} */
213
207
  (contextDependencies),
214
- /** @type {Set<string>} */
208
+ /** @type {Dependencies} */
215
209
  (missingDependencies),
216
210
  snapshotOptions,
217
211
  (err, snapshot) => {
@@ -404,21 +398,21 @@ class ResolverCachePlugin {
404
398
  cachedResolves++;
405
399
  if (resolveContext.missingDependencies) {
406
400
  addAllToSet(
407
- /** @type {Set<string>} */
401
+ /** @type {Dependencies} */
408
402
  (resolveContext.missingDependencies),
409
403
  snapshot.getMissingIterable()
410
404
  );
411
405
  }
412
406
  if (resolveContext.fileDependencies) {
413
407
  addAllToSet(
414
- /** @type {Set<string>} */
408
+ /** @type {Dependencies} */
415
409
  (resolveContext.fileDependencies),
416
410
  snapshot.getFileIterable()
417
411
  );
418
412
  }
419
413
  if (resolveContext.contextDependencies) {
420
414
  addAllToSet(
421
- /** @type {Set<string>} */
415
+ /** @type {Dependencies} */
422
416
  (resolveContext.contextDependencies),
423
417
  snapshot.getContextIterable()
424
418
  );
@@ -34,7 +34,7 @@ class LazyHashedEtag {
34
34
  if (this._hash === undefined) {
35
35
  const hash = createHash(this._hashFunction);
36
36
  this._obj.updateHash(hash);
37
- this._hash = /** @type {string} */ (hash.digest("base64"));
37
+ this._hash = hash.digest("base64");
38
38
  }
39
39
  return this._hash;
40
40
  }
@@ -15,59 +15,46 @@ const browserslist = require("browserslist");
15
15
  // [[C:]/path/to/config][:env]
16
16
  const inputRx = /^(?:((?:[A-Z]:)?[/\\].*?))?(?::(.+?))?$/i;
17
17
 
18
- /**
19
- * @typedef {object} BrowserslistHandlerConfig
20
- * @property {string=} configPath
21
- * @property {string=} env
22
- * @property {string=} query
23
- */
24
-
25
18
  /**
26
19
  * @param {string | null | undefined} input input string
27
20
  * @param {string} context the context directory
28
- * @returns {BrowserslistHandlerConfig} config
21
+ * @returns {string[] | undefined} selected browsers
29
22
  */
30
- const parse = (input, context) => {
31
- if (!input) {
32
- return {};
33
- }
34
-
35
- if (path.isAbsolute(input)) {
23
+ const load = (input, context) => {
24
+ // browserslist:path-to-config
25
+ // browserslist:path-to-config:env
26
+ if (input && path.isAbsolute(input)) {
36
27
  const [, configPath, env] = inputRx.exec(input) || [];
37
- return { configPath, env };
38
- }
39
28
 
40
- const config = browserslist.findConfig(context);
29
+ const config = browserslist.loadConfig({
30
+ config: configPath,
31
+ env
32
+ });
41
33
 
42
- if (config && Object.keys(config).includes(input)) {
43
- return { env: input };
34
+ return browserslist(config, { env });
44
35
  }
45
36
 
46
- return { query: input };
47
- };
37
+ const env = input || undefined;
48
38
 
49
- /**
50
- * @param {string | null | undefined} input input string
51
- * @param {string} context the context directory
52
- * @returns {string[] | undefined} selected browsers
53
- */
54
- const load = (input, context) => {
55
- const { configPath, env, query } = parse(input, context);
39
+ const config = browserslist.loadConfig({
40
+ path: context,
41
+ env
42
+ });
56
43
 
57
- // if a query is specified, then use it, else
58
- // if a path to a config is specified then load it, else
59
- // find a nearest config
60
- const config =
61
- query ||
62
- (configPath
63
- ? browserslist.loadConfig({
64
- config: configPath,
65
- env
66
- })
67
- : browserslist.loadConfig({ path: context, env }));
44
+ // browserslist
45
+ // browserslist:env
46
+ if (config) {
47
+ try {
48
+ return browserslist(config, { env, throwOnMissing: true });
49
+ } catch (_err) {
50
+ // Nothing, no `env` was found in browserslist, maybe input is `queries`
51
+ }
52
+ }
68
53
 
69
- if (!config) return;
70
- return browserslist(config);
54
+ // browserslist:query
55
+ if (env) {
56
+ return browserslist(env);
57
+ }
71
58
  };
72
59
 
73
60
  /**
@@ -104,28 +91,6 @@ const resolve = (browsers) => {
104
91
  const anyBrowser = browsers.some((b) => /^(?!node)/.test(b));
105
92
  const browserProperty = !anyBrowser ? false : anyNode ? null : true;
106
93
  const nodeProperty = !anyNode ? false : anyBrowser ? null : true;
107
- // Internet Explorer Mobile, Blackberry browser and Opera Mini are very old browsers, they do not support new features
108
- const es6DynamicImport = rawChecker({
109
- /* eslint-disable camelcase */
110
- chrome: 63,
111
- and_chr: 63,
112
- edge: 79,
113
- firefox: 67,
114
- and_ff: 67,
115
- // ie: Not supported
116
- opera: 50,
117
- op_mob: 46,
118
- safari: [11, 1],
119
- ios_saf: [11, 3],
120
- samsung: [8, 2],
121
- android: 63,
122
- and_qq: [10, 4],
123
- baidu: [13, 18],
124
- and_uc: [15, 5],
125
- kaios: [3, 0],
126
- node: [12, 17]
127
- /* eslint-enable camelcase */
128
- });
129
94
 
130
95
  return {
131
96
  /* eslint-disable camelcase */
@@ -188,9 +153,9 @@ const resolve = (browsers) => {
188
153
  ios_saf: 7,
189
154
  samsung: [3, 0],
190
155
  android: 38,
191
- // and_qq: Unknown support
156
+ and_qq: [10, 4],
192
157
  // baidu: Unknown support
193
- // and_uc: Unknown support
158
+ and_uc: [12, 12],
194
159
  kaios: [3, 0],
195
160
  node: [0, 12]
196
161
  }),
@@ -207,9 +172,9 @@ const resolve = (browsers) => {
207
172
  ios_saf: 8,
208
173
  samsung: [5, 0],
209
174
  android: 49,
210
- // and_qq: Unknown support
175
+ and_qq: [10, 4],
211
176
  // baidu: Unknown support
212
- // and_uc: Unknown support
177
+ and_uc: [12, 12],
213
178
  kaios: [2, 5],
214
179
  node: [6, 0]
215
180
  }),
@@ -253,8 +218,44 @@ const resolve = (browsers) => {
253
218
  kaios: [3, 0],
254
219
  node: [12, 17]
255
220
  }),
256
- dynamicImport: es6DynamicImport,
257
- dynamicImportInWorker: es6DynamicImport && !anyNode,
221
+ dynamicImport: rawChecker({
222
+ chrome: 63,
223
+ and_chr: 63,
224
+ edge: 79,
225
+ firefox: 67,
226
+ and_ff: 67,
227
+ // ie: Not supported
228
+ opera: 50,
229
+ op_mob: 46,
230
+ safari: [11, 1],
231
+ ios_saf: [11, 3],
232
+ samsung: [8, 2],
233
+ android: 63,
234
+ and_qq: [10, 4],
235
+ baidu: [13, 18],
236
+ and_uc: [15, 5],
237
+ kaios: [3, 0],
238
+ node: [12, 17]
239
+ }),
240
+ dynamicImportInWorker: rawChecker({
241
+ chrome: 80,
242
+ and_chr: 80,
243
+ edge: 80,
244
+ firefox: 114,
245
+ and_ff: 114,
246
+ // ie: Not supported
247
+ opera: 67,
248
+ op_mob: 57,
249
+ safari: [15, 0],
250
+ ios_saf: [15, 0],
251
+ samsung: [13, 0],
252
+ android: 80,
253
+ and_qq: [10, 4],
254
+ baidu: [13, 18],
255
+ and_uc: [15, 5],
256
+ kaios: [3, 0],
257
+ node: [12, 17]
258
+ }),
258
259
  // browserslist does not have info about globalThis
259
260
  // so this is based on mdn-browser-compat-data
260
261
  globalThis: rawChecker({
@@ -270,9 +271,9 @@ const resolve = (browsers) => {
270
271
  ios_saf: [12, 2],
271
272
  samsung: [10, 1],
272
273
  android: 71,
273
- // and_qq: Unknown support
274
+ and_qq: [13, 1],
274
275
  // baidu: Unknown support
275
- // and_uc: Unknown support
276
+ and_uc: [15, 5],
276
277
  kaios: [3, 0],
277
278
  node: 12
278
279
  }),
@@ -289,9 +290,9 @@ const resolve = (browsers) => {
289
290
  ios_saf: [13, 4],
290
291
  samsung: 13,
291
292
  android: 80,
292
- // and_qq: Not supported
293
+ and_qq: [13, 1],
293
294
  // baidu: Not supported
294
- // and_uc: Not supported
295
+ and_uc: [15, 5],
295
296
  kaios: [3, 0],
296
297
  node: 14
297
298
  }),
@@ -327,9 +328,9 @@ const resolve = (browsers) => {
327
328
  ios_saf: 11,
328
329
  samsung: [6, 2],
329
330
  android: 55,
330
- and_qq: [13, 1],
331
+ and_qq: [10, 4],
331
332
  baidu: [13, 18],
332
- and_uc: [15, 5],
333
+ and_uc: [12, 12],
333
334
  kaios: 3,
334
335
  node: [7, 6]
335
336
  }),
@@ -345,7 +346,7 @@ const resolve = (browsers) => {
345
346
  fetchWasm: browserProperty,
346
347
  global: nodeProperty,
347
348
  importScripts: false,
348
- importScriptsInWorker: true,
349
+ importScriptsInWorker: Boolean(browserProperty),
349
350
  nodeBuiltins: nodeProperty,
350
351
  nodePrefixForCoreModules:
351
352
  nodeProperty &&