@depup/webpack 5.110.1-depup.0 → 5.111.1-depup.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.
- package/README.md +7 -8
- package/changes.json +7 -11
- package/lib/APIPlugin.js +26 -11
- package/lib/AutomaticPrefetchPlugin.js +1 -1
- package/lib/Cache.js +8 -3
- package/lib/CacheFacade.js +1 -1
- package/lib/ChunkGraph.js +20 -18
- package/lib/CircularModulesPlugin.js +157 -55
- package/lib/CleanPlugin.js +2 -2
- package/lib/CompatibilityPlugin.js +3 -4
- package/lib/Compilation.js +337 -338
- package/lib/Compiler.js +213 -51
- package/lib/ConcatenationScope.js +25 -35
- package/lib/ConstPlugin.js +16 -132
- package/lib/CopyPlugin.js +1054 -0
- package/lib/DefinePlugin.js +24 -8
- package/lib/DependencyTemplate.js +2 -1
- package/lib/DotenvPlugin.js +64 -40
- package/lib/ErrorHelpers.js +113 -0
- package/lib/ExportsInfo.js +30 -16
- package/lib/ExternalModule.js +47 -22
- package/lib/FileSystemInfo.js +17 -14
- package/lib/FlagDependencyExportsPlugin.js +53 -34
- package/lib/FlagDependencyUsagePlugin.js +17 -15
- package/lib/Generator.js +24 -2
- package/lib/HotModuleReplacementPlugin.js +55 -7
- package/lib/IgnorePlugin.js +1 -1
- package/lib/JavascriptMetaInfoPlugin.js +5 -3
- package/lib/LoaderOptionsPlugin.js +1 -1
- package/lib/MainTemplate.js +5 -1
- package/lib/Module.js +19 -10
- package/lib/ModuleGraph.js +6 -9
- package/lib/MultiCompiler.js +7 -17
- package/lib/MultiWatching.js +1 -1
- package/lib/NormalModule.js +148 -70
- package/lib/NormalModuleFactory.js +1 -1
- package/lib/RuntimeGlobals.js +21 -7
- package/lib/RuntimeModule.js +28 -12
- package/lib/RuntimePlugin.js +33 -3
- package/lib/RuntimeTemplate.js +1147 -847
- package/lib/SourceMapDevToolPlugin.js +54 -104
- package/lib/TemplatedPathPlugin.js +16 -59
- package/lib/Watching.js +9 -0
- package/lib/WebpackOptionsApply.js +84 -91
- package/lib/asset/AssetBytesGenerator.js +7 -1
- package/lib/asset/AssetGenerator.js +50 -24
- package/lib/asset/AssetModule.js +3 -0
- package/lib/asset/AssetSourceGenerator.js +7 -1
- package/lib/asset/WebManifestParser.js +7 -5
- package/lib/async-modules/AsyncModuleHelpers.js +10 -4
- package/lib/buildChunkGraph.js +11 -15
- package/lib/cache/AddBuildDependenciesPlugin.js +33 -4
- package/lib/cache/IdleFileCachePlugin.js +2 -2
- package/lib/cache/MemoryCachePlugin.js +4 -4
- package/lib/cache/MemoryWithGcCachePlugin.js +7 -8
- package/lib/cache/PackFileCacheStrategy.js +17 -19
- package/lib/cache/getLazyHashedEtag.js +3 -5
- package/lib/config/browserslistTargetHandler.js +17 -4
- package/lib/config/defaults.js +162 -142
- package/lib/config/getClaimedAssetTypes.js +10 -11
- package/lib/config/normalization.js +100 -20
- package/lib/config/target.js +13 -4
- package/lib/container/ContainerReferencePlugin.js +6 -0
- package/lib/container/RemoteRuntimeModule.js +9 -0
- package/lib/container/declaredRemotes.js +39 -0
- package/lib/{ContextExclusionPlugin.js → context/ContextExclusionPlugin.js} +1 -1
- package/lib/{ContextModule.js → context/ContextModule.js} +54 -115
- package/lib/{ContextModuleFactory.js → context/ContextModuleFactory.js} +19 -21
- package/lib/{ContextReplacementPlugin.js → context/ContextReplacementPlugin.js} +4 -4
- package/lib/css/CssGenerator.js +27 -11
- package/lib/css/CssInjectStyleRuntimeModule.js +9 -0
- package/lib/css/CssLoadingRuntimeModule.js +92 -15
- package/lib/css/CssModule.js +1 -1
- package/lib/css/CssModulesPlugin.js +3 -10
- package/lib/css/CssParser.js +162 -31
- package/lib/css/CssServerStylesRuntimeModule.js +9 -0
- package/lib/css/cssMinify.js +43 -32
- package/lib/css/data.js +3526 -871
- package/lib/css/syntax.js +6455 -1237
- package/lib/debug/ProfilingPlugin.js +7 -4
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +6 -3
- package/lib/dependencies/AMDRuntimeModules.js +18 -0
- package/lib/dependencies/CommonJsExportRequireDependency.js +13 -12
- package/lib/dependencies/CommonJsExportsParserPlugin.js +12 -13
- package/lib/dependencies/CommonJsImportsParserPlugin.js +5 -5
- package/lib/dependencies/CommonJsPlugin.js +19 -3
- package/lib/dependencies/CommonJsRequireDependency.js +32 -9
- package/lib/dependencies/CommonJsSelfReferenceDependency.js +2 -4
- package/lib/dependencies/ContextDependency.js +1 -1
- package/lib/dependencies/ContextDependencyHelpers.js +3 -9
- package/lib/dependencies/ContextDependencyTemplateAsRequireCall.js +20 -7
- package/lib/dependencies/ContextElementDependency.js +1 -1
- package/lib/dependencies/CssIcssExportDependency.js +13 -9
- package/lib/dependencies/CssIcssImportDependency.js +3 -6
- package/lib/dependencies/CssUrlDependency.js +3 -5
- package/lib/dependencies/HarmonyCompatibilityDependency.js +67 -22
- package/lib/dependencies/HarmonyDetectionParserPlugin.js +3 -4
- package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +10 -4
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +12 -7
- package/lib/dependencies/HarmonyExportExpressionDependency.js +47 -33
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +217 -34
- package/lib/dependencies/HarmonyExportInitFragment.js +110 -23
- package/lib/dependencies/HarmonyExportSpecifierDependency.js +25 -58
- package/lib/dependencies/HarmonyImportBareSideEffectDependency.js +59 -0
- package/lib/dependencies/HarmonyImportDependency.js +99 -41
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +198 -25
- package/lib/dependencies/HarmonyImportSideEffectDependency.js +117 -4
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +40 -3
- package/lib/dependencies/HarmonyModulesPlugin.js +20 -0
- package/lib/dependencies/HtmlEntryDependency.js +136 -104
- package/lib/dependencies/HtmlInlineScriptDependency.js +3 -4
- package/lib/dependencies/HtmlInlineStyleDependency.js +3 -4
- package/lib/dependencies/ImportContextDependency.js +43 -3
- package/lib/dependencies/ImportDependency.js +8 -29
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +1 -1
- package/lib/dependencies/ImportMetaGlobHelpers.js +1 -1
- package/lib/dependencies/ImportMetaMainDependency.js +104 -0
- package/lib/dependencies/ImportMetaPlugin.js +67 -25
- package/lib/dependencies/ImportParserPlugin.js +25 -15
- package/lib/dependencies/LoaderPlugin.js +26 -1
- package/lib/dependencies/RequireContextDependencyParserPlugin.js +1 -1
- package/lib/dependencies/RequireHeaderDependency.js +20 -21
- package/lib/dependencies/SystemRuntimeModule.js +9 -0
- package/lib/dependencies/URLContextDependency.js +1 -1
- package/lib/dependencies/URLDependency.js +6 -5
- package/lib/dependencies/WorkerAndWorkletPlugin.js +16 -21
- package/lib/dependencies/WorkerDependency.js +12 -18
- package/lib/dependencies/WorkletDependency.js +12 -20
- package/lib/dependencies/importOptionsCheck.js +47 -0
- package/lib/dll/DelegatedModule.js +18 -1
- package/lib/dll/DllReferencePlugin.js +11 -8
- package/lib/dll/LibManifestPlugin.js +1 -1
- package/lib/errors/AnalyzableBailoutsWarning.js +41 -0
- package/lib/errors/DotenvFileError.js +29 -0
- package/lib/errors/DuplicateModulesWarning.js +12 -7
- package/lib/errors/EmptyCopyPatternWarning.js +26 -0
- package/lib/errors/ExternalStarReexportError.js +44 -0
- package/lib/errors/HookWebpackError.js +3 -2
- package/lib/errors/ImportedBindingAssignmentError.js +30 -0
- package/lib/errors/MissingSourceMapsWarning.js +36 -0
- package/lib/errors/ModuleParseError.js +2 -1
- package/lib/errors/UnusedAssetsWarning.js +36 -0
- package/lib/errors/UnusedFederationWarning.js +35 -0
- package/lib/errors/UnusedModulesWarning.js +38 -0
- package/lib/esm/ExportWebpackRequireRuntimeModule.js +9 -0
- package/lib/esm/ModuleChunkFormatPlugin.js +28 -3
- package/lib/esm/ModuleChunkLoadingPlugin.js +21 -5
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +91 -53
- package/lib/hmr/HotModuleReplacement.runtime.js +8 -2
- package/lib/hmr/HotModuleReplacementRuntimeModule.js +9 -0
- package/lib/hmr/LazyCompilationPlugin.js +3 -5
- package/lib/html/HtmlGenerator.js +72 -87
- package/lib/html/HtmlModulesPlugin.js +479 -215
- package/lib/html/HtmlParser.js +110 -147
- package/lib/html/builtinEmbeddedRenderer.js +107 -0
- package/lib/html/data.js +142 -7
- package/lib/html/htmlMinify.js +92 -122
- package/lib/html/syntax.js +2031 -1556
- package/lib/ids/HashedModuleIdsPlugin.js +2 -1
- package/lib/index.js +49 -3
- package/lib/javascript/ChunkFormatHelpers.js +4 -3
- package/lib/javascript/JavascriptGenerator.js +8 -1
- package/lib/javascript/JavascriptModule.js +1 -0
- package/lib/javascript/JavascriptModulesPlugin.js +76 -80
- package/lib/javascript/JavascriptParser.js +1970 -900
- package/lib/javascript/StartupHelpers.js +27 -3
- package/lib/javascript/data.js +172 -0
- package/lib/javascript/grammar.js +5546 -0
- package/lib/javascript/parser.js +1500 -0
- package/lib/javascript/regexp.js +1762 -0
- package/lib/javascript/regexpData.js +51 -0
- package/lib/javascript/syntax.js +9061 -5262
- package/lib/json/JsonGenerator.js +7 -1
- package/lib/library/ModuleLibraryPlugin.js +171 -132
- package/lib/loaders/LoaderRunner.js +170 -14
- package/lib/node/NodeWatchFileSystem.js +3 -9
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +22 -0
- package/lib/node/ReadFileCompileAsyncWasmPlugin.js +8 -15
- package/lib/node/RequireChunkLoadingRuntimeModule.js +22 -0
- package/lib/optimize/AggressiveMergingPlugin.js +3 -5
- package/lib/optimize/ConcatenatedModule.js +222 -125
- package/lib/optimize/ConstExportsPlugin.js +50 -34
- package/lib/optimize/FlagIncludedChunksPlugin.js +3 -11
- package/lib/optimize/InlineExports.js +20 -2
- package/lib/optimize/InnerGraphPlugin.js +7 -13
- package/lib/optimize/LimitChunkCountPlugin.js +5 -8
- package/lib/optimize/MangleExportsPlugin.js +13 -4
- package/lib/optimize/ModuleConcatenationPlugin.js +27 -5
- package/lib/optimize/RealContentHashPlugin.js +179 -44
- package/lib/optimize/SideEffectsFlagPlugin.js +24 -28
- package/lib/optimize/SplitChunksPlugin.js +2 -4
- package/lib/performance/AnalyzableBailoutsPlugin.js +115 -0
- package/lib/performance/BroadContextsPlugin.js +1 -1
- package/lib/performance/CacheEffectivenessPlugin.js +7 -7
- package/lib/performance/DuplicateModulesPlugin.js +57 -13
- package/lib/performance/EvalUsagePlugin.js +5 -2
- package/lib/performance/MissingSourceMapsPlugin.js +115 -0
- package/lib/performance/PureAnnotationsPlugin.js +6 -3
- package/lib/performance/SizeLimitsPlugin.js +2 -4
- package/lib/performance/TopLevelThisPlugin.js +5 -4
- package/lib/performance/UnusedAssetsPlugin.js +109 -0
- package/lib/performance/UnusedFederationPlugin.js +147 -0
- package/lib/performance/UnusedModulesPlugin.js +141 -0
- package/lib/performance/UnusedReexportsPlugin.js +1 -55
- package/lib/performance/isOnlyReexported.js +65 -0
- package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +25 -5
- package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +8 -8
- package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +9 -0
- package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +9 -0
- package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +9 -0
- package/lib/prefetch/ResourceHintPlugin.js +29 -35
- package/lib/prefetch/ResourceHintRuntimeModule.js +9 -0
- package/lib/prefetch/StartupAssetHintRuntimeModule.js +16 -10
- package/lib/rules/RuleSetCompiler.js +211 -4
- package/lib/runtime/AsyncModuleRuntimeModule.js +103 -67
- package/lib/runtime/AutoPublicPathRuntimeModule.js +9 -0
- package/lib/runtime/BaseUriRuntimeModule.js +9 -0
- package/lib/runtime/ChunkNameRuntimeModule.js +9 -0
- package/lib/runtime/EnsureChunkRuntimeModule.js +35 -16
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +12 -4
- package/lib/runtime/GetFullHashRuntimeModule.js +9 -0
- package/lib/runtime/GetMainFilenameRuntimeModule.js +9 -0
- package/lib/runtime/GetWorkletBootstrapRuntimeModule.js +9 -0
- package/lib/runtime/GlobalRuntimeModule.js +11 -4
- package/lib/runtime/HasOwnPropertyRuntimeModule.js +9 -0
- package/lib/runtime/HelperRuntimeModule.js +10 -0
- package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +313 -222
- package/lib/runtime/NonceRuntimeModule.js +9 -0
- package/lib/runtime/OnChunksLoadedRuntimeModule.js +67 -20
- package/lib/runtime/PublicPathRuntimeModule.js +9 -0
- package/lib/runtime/RuntimeIdRuntimeModule.js +9 -0
- package/lib/runtime/SpecNamespaceObjectRuntimeModule.js +90 -0
- package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +9 -0
- package/lib/runtime/StartupEntrypointRuntimeModule.js +9 -0
- package/lib/runtime/SystemContextRuntimeModule.js +9 -0
- package/lib/runtime/ToBinaryRuntimeModule.js +9 -0
- package/lib/schemes/DataUriPlugin.js +3 -6
- package/lib/schemes/HttpUriPlugin.js +22 -5
- package/lib/schemes/VirtualUrlPlugin.js +1 -1
- package/lib/serialization/BinaryMiddleware.js +9 -9
- package/lib/serialization/FileMiddleware.js +31 -18
- package/lib/serialization/ObjectMiddleware.js +168 -139
- package/lib/sharing/ConsumeSharedPlugin.js +12 -0
- package/lib/sharing/ConsumeSharedRuntimeModule.js +11 -0
- package/lib/sharing/ShareRuntimeModule.js +9 -0
- package/lib/sharing/declaredShared.js +47 -0
- package/lib/stats/DefaultStatsFactoryPlugin.js +6 -5
- package/lib/stats/DefaultStatsPrinterPlugin.js +3 -0
- package/lib/typescript/TypeScriptPlugin.js +10 -13
- package/lib/url/URLParserPlugin.js +6 -8
- package/lib/util/ArrayQueue.js +3 -3
- package/lib/util/LocConverter.js +4 -7
- package/lib/util/SourceProcessor.js +115 -99
- package/lib/util/URLAbsoluteSpecifier.js +3 -1
- package/lib/util/async.js +292 -0
- package/lib/util/buildDiagnostics.js +69 -0
- package/lib/util/chainedImports.js +3 -4
- package/lib/util/concatenate.js +4 -4
- package/lib/util/conventions.js +5 -1
- package/lib/util/createHooksRegistry.js +1 -2
- package/lib/util/createMappings.js +25 -3
- package/lib/util/dataURL.js +2 -3
- package/lib/util/deterministicGrouping.js +8 -13
- package/lib/util/findGraphRoots.js +6 -13
- package/lib/util/fs.js +27 -1
- package/lib/util/globUtils.js +1 -1
- package/lib/util/handlerKeys.js +40 -0
- package/lib/util/hash/wasm-hash.js +3 -4
- package/lib/util/identifier.js +20 -0
- package/lib/util/internalSerializables.js +7 -1
- package/lib/util/registerExternalSerializer.js +6 -45
- package/lib/util/removeBOM.js +82 -1
- package/lib/util/semver.js +5 -3
- package/lib/wasm-async/AsyncWasmCompileRuntimeModule.js +14 -3
- package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +14 -3
- package/lib/wasm-async/AsyncWebAssemblyGenerator.js +6 -1
- package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +5 -1
- package/lib/wasm-async/UniversalCompileAsyncWasmPlugin.js +7 -12
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +12 -4
- package/lib/wasm-sync/WebAssemblyGenerator.js +6 -1
- package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +5 -1
- package/lib/wasm-sync/WebAssemblyUtils.js +2 -4
- package/lib/web/FetchCompileAsyncWasmPlugin.js +10 -6
- package/lib/web/FetchCompileWasmPlugin.js +4 -2
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +36 -0
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +19 -0
- package/package.json +55 -46
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +388 -76
- package/schemas/plugins/LoaderOptionsPlugin.check.js +1 -1
- package/schemas/plugins/ManifestPlugin.check.js +1 -1
- package/schemas/plugins/SourceMapDevToolPlugin.check.js +1 -1
- package/schemas/plugins/asset/AssetGeneratorOptions.check.js +1 -1
- package/schemas/plugins/asset/AssetResourceGeneratorOptions.check.js +1 -1
- package/schemas/plugins/container/ContainerPlugin.check.js +1 -1
- package/schemas/plugins/container/ModuleFederationPlugin.check.js +1 -1
- package/schemas/plugins/debug/ProfilingPlugin.check.js +1 -1
- package/schemas/plugins/dll/DllReferencePlugin.check.js +1 -1
- package/schemas/plugins/ids/HashedModuleIdsPlugin.check.js +1 -1
- package/schemas/plugins/schemes/HttpUriPlugin.check.js +1 -1
- package/types.d.ts +1795 -608
- package/lib/dependencies/ExportBindingInitFragment.js +0 -191
- package/lib/errors/EntrypointOverlapWarning.js +0 -45
- package/lib/performance/EntrypointOverlapPlugin.js +0 -122
|
@@ -240,6 +240,33 @@
|
|
|
240
240
|
"description": "Report the first error as a hard error instead of tolerating it.",
|
|
241
241
|
"type": "boolean"
|
|
242
242
|
},
|
|
243
|
+
"BuildDependencyItem": {
|
|
244
|
+
"description": "A build dependency for filesystem cache invalidation.",
|
|
245
|
+
"anyOf": [
|
|
246
|
+
{
|
|
247
|
+
"description": "Request to a dependency (resolved as directory relative to the context directory).",
|
|
248
|
+
"type": "string",
|
|
249
|
+
"minLength": 1
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"type": "object",
|
|
253
|
+
"additionalProperties": false,
|
|
254
|
+
"properties": {
|
|
255
|
+
"dependency": {
|
|
256
|
+
"description": "Request to a dependency (resolved as directory relative to the context directory).",
|
|
257
|
+
"type": "string",
|
|
258
|
+
"minLength": 1
|
|
259
|
+
},
|
|
260
|
+
"optional": {
|
|
261
|
+
"description": "When true, the dependency may be missing. Existence changes invalidate the cache.",
|
|
262
|
+
"type": "boolean"
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"required": ["dependency"]
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
"added": "5.111.0"
|
|
269
|
+
},
|
|
243
270
|
"CacheOptions": {
|
|
244
271
|
"description": "Cache generated modules and chunks to improve performance for multiple incremental builds.",
|
|
245
272
|
"anyOf": [
|
|
@@ -380,6 +407,243 @@
|
|
|
380
407
|
"type": "string",
|
|
381
408
|
"absolutePath": true
|
|
382
409
|
},
|
|
410
|
+
"Copy": {
|
|
411
|
+
"description": "Copy files and directories to the output directory.",
|
|
412
|
+
"anyOf": [
|
|
413
|
+
{
|
|
414
|
+
"type": "array",
|
|
415
|
+
"items": {
|
|
416
|
+
"$ref": "#/definitions/CopyPattern"
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"description": "Glob or path from where the files are copied. A glob separates with '/', matches dot files, and takes '*', '**', '?', '[]' and '{}'.",
|
|
421
|
+
"type": "string",
|
|
422
|
+
"minLength": 1
|
|
423
|
+
}
|
|
424
|
+
],
|
|
425
|
+
"added": "5.111.0"
|
|
426
|
+
},
|
|
427
|
+
"CopyGlobOptions": {
|
|
428
|
+
"description": "Options of the glob in 'from'.",
|
|
429
|
+
"type": "object",
|
|
430
|
+
"additionalProperties": false,
|
|
431
|
+
"properties": {
|
|
432
|
+
"caseSensitive": {
|
|
433
|
+
"description": "Whether the glob matches the case of a file name. Defaults to 'true'.",
|
|
434
|
+
"type": "boolean"
|
|
435
|
+
},
|
|
436
|
+
"deep": {
|
|
437
|
+
"description": "How many directory levels below the base of the glob are read, where '1' reads only the base itself. Defaults to no limit.",
|
|
438
|
+
"type": "number",
|
|
439
|
+
"minimum": 1
|
|
440
|
+
},
|
|
441
|
+
"dot": {
|
|
442
|
+
"description": "Whether the glob reaches a file or a directory whose name starts with a dot without naming it. Defaults to 'true'.",
|
|
443
|
+
"type": "boolean"
|
|
444
|
+
},
|
|
445
|
+
"followSymlinks": {
|
|
446
|
+
"description": "Whether a symbolic link is resolved and copied as what it points at. Defaults to 'true'; 'false' copies the link itself, pointing where it already points.",
|
|
447
|
+
"type": "boolean"
|
|
448
|
+
},
|
|
449
|
+
"ignore": {
|
|
450
|
+
"description": "Globs of the files which are not copied, resolved like 'from'. A directory one of them matches is skipped whole.",
|
|
451
|
+
"type": "array",
|
|
452
|
+
"items": {
|
|
453
|
+
"description": "Glob of the files which are not copied.",
|
|
454
|
+
"type": "string",
|
|
455
|
+
"minLength": 1
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
"CopyObjectPattern": {
|
|
461
|
+
"description": "A pattern of files which are copied to the output directory.",
|
|
462
|
+
"type": "object",
|
|
463
|
+
"additionalProperties": false,
|
|
464
|
+
"properties": {
|
|
465
|
+
"context": {
|
|
466
|
+
"description": "Directory 'from' is resolved from and the copied paths are relative to. Defaults to the compiler context, and to what 'from' names when it is not a glob.",
|
|
467
|
+
"type": "string"
|
|
468
|
+
},
|
|
469
|
+
"filename": {
|
|
470
|
+
"description": "Filename template of a copied file inside 'to'. Defaults to '[path][base]', which keeps the name and the directory structure below 'from'.",
|
|
471
|
+
"anyOf": [
|
|
472
|
+
{
|
|
473
|
+
"type": "string",
|
|
474
|
+
"absolutePath": false
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"instanceof": "Function",
|
|
478
|
+
"tsType": "import('../lib/CopyPlugin').CopyFilenameFunction"
|
|
479
|
+
}
|
|
480
|
+
]
|
|
481
|
+
},
|
|
482
|
+
"from": {
|
|
483
|
+
"description": "Glob or path from where the files are copied.",
|
|
484
|
+
"anyOf": [
|
|
485
|
+
{
|
|
486
|
+
"description": "Globs or paths from where the files are copied, in order.",
|
|
487
|
+
"type": "array",
|
|
488
|
+
"items": {
|
|
489
|
+
"description": "Glob or path from where the files are copied. A glob separates with '/', matches dot files, and takes '*', '**', '?', '[]' and '{}'.",
|
|
490
|
+
"type": "string",
|
|
491
|
+
"minLength": 1
|
|
492
|
+
},
|
|
493
|
+
"minItems": 1
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
"description": "Glob or path from where the files are copied. A glob separates with '/', matches dot files, and takes '*', '**', '?', '[]' and '{}'.",
|
|
497
|
+
"type": "string",
|
|
498
|
+
"minLength": 1
|
|
499
|
+
}
|
|
500
|
+
]
|
|
501
|
+
},
|
|
502
|
+
"globOptions": {
|
|
503
|
+
"$ref": "#/definitions/CopyGlobOptions"
|
|
504
|
+
},
|
|
505
|
+
"info": {
|
|
506
|
+
"description": "Asset info of a copied file.",
|
|
507
|
+
"anyOf": [
|
|
508
|
+
{
|
|
509
|
+
"description": "Asset info of a copied file.",
|
|
510
|
+
"type": "object",
|
|
511
|
+
"additionalProperties": true,
|
|
512
|
+
"properties": {},
|
|
513
|
+
"tsType": "import('../lib/Compilation').AssetInfo"
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
"description": "Asset info of a copied file, from the file itself.",
|
|
517
|
+
"instanceof": "Function",
|
|
518
|
+
"tsType": "import('../lib/CopyPlugin').CopyInfoFunction"
|
|
519
|
+
}
|
|
520
|
+
]
|
|
521
|
+
},
|
|
522
|
+
"preservePermissions": {
|
|
523
|
+
"description": "Whether a copied file keeps the permissions of the file it was copied from. Defaults to 'false', which gives it the ones a new file gets. Has no effect on Windows.",
|
|
524
|
+
"type": "boolean"
|
|
525
|
+
},
|
|
526
|
+
"preserveTimestamps": {
|
|
527
|
+
"description": "Whether a copied file keeps the access and modification times of the file it was copied from. Defaults to 'false', which stamps it with the time it was written.",
|
|
528
|
+
"type": "boolean"
|
|
529
|
+
},
|
|
530
|
+
"to": {
|
|
531
|
+
"description": "Directory the files are copied to, relative to 'output.path', which is where they land by default.",
|
|
532
|
+
"anyOf": [
|
|
533
|
+
{
|
|
534
|
+
"description": "Directory the files are copied to, relative to 'output.path', which is where they land by default.",
|
|
535
|
+
"type": "string",
|
|
536
|
+
"absolutePath": false
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"description": "Directory a copied file is copied to, relative to 'output.path', from the file itself.",
|
|
540
|
+
"instanceof": "Function",
|
|
541
|
+
"tsType": "import('../lib/CopyPlugin').CopyToFunction"
|
|
542
|
+
}
|
|
543
|
+
]
|
|
544
|
+
},
|
|
545
|
+
"transform": {
|
|
546
|
+
"description": "Modifies the content of a copied file.",
|
|
547
|
+
"anyOf": [
|
|
548
|
+
{
|
|
549
|
+
"description": "Modifies the content of a copied file, and says how the result is cached.",
|
|
550
|
+
"type": "object",
|
|
551
|
+
"additionalProperties": false,
|
|
552
|
+
"properties": {
|
|
553
|
+
"cache": {
|
|
554
|
+
"description": "Whether the result of the transform is cached, and what it is cached under. Defaults to 'true'.",
|
|
555
|
+
"anyOf": [
|
|
556
|
+
{
|
|
557
|
+
"description": "Whether the result of the transform is cached.",
|
|
558
|
+
"type": "boolean"
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
"description": "What the result of the transform is cached under, beside the content of the file.",
|
|
562
|
+
"type": "object",
|
|
563
|
+
"additionalProperties": false,
|
|
564
|
+
"properties": {
|
|
565
|
+
"keys": {
|
|
566
|
+
"description": "Everything beside the content of the file the transform depends on, serialized into the cache key as JSON.",
|
|
567
|
+
"anyOf": [
|
|
568
|
+
{
|
|
569
|
+
"description": "Everything beside the content of the file the transform depends on, serialized into the cache key as JSON.",
|
|
570
|
+
"type": "object",
|
|
571
|
+
"additionalProperties": true,
|
|
572
|
+
"properties": {},
|
|
573
|
+
"tsType": "import('../lib/CopyPlugin').CopyTransformCacheKeys"
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
"description": "Everything beside the content of the file the transform depends on, from the file itself.",
|
|
577
|
+
"instanceof": "Function",
|
|
578
|
+
"tsType": "import('../lib/CopyPlugin').CopyTransformCacheKeysFunction"
|
|
579
|
+
}
|
|
580
|
+
]
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
]
|
|
585
|
+
},
|
|
586
|
+
"transformer": {
|
|
587
|
+
"description": "Modifies the content of a copied file.",
|
|
588
|
+
"instanceof": "Function",
|
|
589
|
+
"tsType": "import('../lib/CopyPlugin').CopyTransform"
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
"required": ["transformer"]
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"description": "Modifies the content of a copied file.",
|
|
596
|
+
"instanceof": "Function",
|
|
597
|
+
"tsType": "import('../lib/CopyPlugin').CopyTransform"
|
|
598
|
+
}
|
|
599
|
+
]
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
"required": ["from"]
|
|
603
|
+
},
|
|
604
|
+
"CopyOptions": {
|
|
605
|
+
"description": "Patterns of files which are copied to the output directory, and the options of the copying itself.",
|
|
606
|
+
"type": "object",
|
|
607
|
+
"additionalProperties": false,
|
|
608
|
+
"properties": {
|
|
609
|
+
"concurrency": {
|
|
610
|
+
"description": "Maximum number of files which are read at the same time. Defaults to '100'.",
|
|
611
|
+
"type": "number",
|
|
612
|
+
"minimum": 1
|
|
613
|
+
},
|
|
614
|
+
"patterns": {
|
|
615
|
+
"$ref": "#/definitions/CopyPatterns"
|
|
616
|
+
},
|
|
617
|
+
"stage": {
|
|
618
|
+
"description": "Stage of 'processAssets' the files are copied at. Defaults to 'Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL', where a copied file is still minimized and compressed like every other asset; a later stage leaves it as it is on disk.",
|
|
619
|
+
"type": "number"
|
|
620
|
+
}
|
|
621
|
+
},
|
|
622
|
+
"required": ["patterns"]
|
|
623
|
+
},
|
|
624
|
+
"CopyPattern": {
|
|
625
|
+
"description": "A glob or a path of files which are copied to the output directory.",
|
|
626
|
+
"anyOf": [
|
|
627
|
+
{
|
|
628
|
+
"description": "Glob or path from where the files are copied. A glob separates with '/', matches dot files, and takes '*', '**', '?', '[]' and '{}'.",
|
|
629
|
+
"type": "string",
|
|
630
|
+
"minLength": 1
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
"$ref": "#/definitions/CopyObjectPattern"
|
|
634
|
+
}
|
|
635
|
+
]
|
|
636
|
+
},
|
|
637
|
+
"CopyPatterns": {
|
|
638
|
+
"description": "Patterns of files which are copied to the output directory.",
|
|
639
|
+
"type": "array",
|
|
640
|
+
"cli": {
|
|
641
|
+
"exclude": true
|
|
642
|
+
},
|
|
643
|
+
"items": {
|
|
644
|
+
"$ref": "#/definitions/CopyPattern"
|
|
645
|
+
}
|
|
646
|
+
},
|
|
383
647
|
"CrossOriginLoading": {
|
|
384
648
|
"description": "This option enables cross-origin loading of chunks.",
|
|
385
649
|
"enum": [false, "anonymous", "use-credentials"]
|
|
@@ -1239,6 +1503,11 @@
|
|
|
1239
1503
|
"templateLiteral": {
|
|
1240
1504
|
"description": "The environment supports template literals.",
|
|
1241
1505
|
"type": "boolean"
|
|
1506
|
+
},
|
|
1507
|
+
"topLevelAwait": {
|
|
1508
|
+
"description": "The environment supports top-level await ('await x' at the top level of a module).",
|
|
1509
|
+
"type": "boolean",
|
|
1510
|
+
"added": "5.111.0"
|
|
1242
1511
|
}
|
|
1243
1512
|
}
|
|
1244
1513
|
},
|
|
@@ -1342,12 +1611,6 @@
|
|
|
1342
1611
|
"experimental": true,
|
|
1343
1612
|
"added": "5.17.0"
|
|
1344
1613
|
},
|
|
1345
|
-
"outputModule": {
|
|
1346
|
-
"description": "Allow output javascript files as module source type.",
|
|
1347
|
-
"type": "boolean",
|
|
1348
|
-
"experimental": true,
|
|
1349
|
-
"added": "5.0.0"
|
|
1350
|
-
},
|
|
1351
1614
|
"sourceImport": {
|
|
1352
1615
|
"description": "Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.",
|
|
1353
1616
|
"type": "boolean",
|
|
@@ -1474,12 +1737,6 @@
|
|
|
1474
1737
|
"experimental": true,
|
|
1475
1738
|
"added": "5.17.0"
|
|
1476
1739
|
},
|
|
1477
|
-
"outputModule": {
|
|
1478
|
-
"description": "Allow output javascript files as module source type.",
|
|
1479
|
-
"type": "boolean",
|
|
1480
|
-
"experimental": true,
|
|
1481
|
-
"added": "5.0.0"
|
|
1482
|
-
},
|
|
1483
1740
|
"sourceImport": {
|
|
1484
1741
|
"description": "Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.",
|
|
1485
1742
|
"type": "boolean",
|
|
@@ -1832,9 +2089,7 @@
|
|
|
1832
2089
|
"description": "List of dependencies the build depends on.",
|
|
1833
2090
|
"type": "array",
|
|
1834
2091
|
"items": {
|
|
1835
|
-
"
|
|
1836
|
-
"type": "string",
|
|
1837
|
-
"minLength": 1
|
|
2092
|
+
"$ref": "#/definitions/BuildDependencyItem"
|
|
1838
2093
|
}
|
|
1839
2094
|
}
|
|
1840
2095
|
},
|
|
@@ -2782,6 +3037,11 @@
|
|
|
2782
3037
|
"description": "Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.",
|
|
2783
3038
|
"type": "boolean"
|
|
2784
3039
|
},
|
|
3040
|
+
"specNamespaceObject": {
|
|
3041
|
+
"description": "Hand out a spec-compliant Module Namespace Exotic Object for 'import * as ns' and 'import()' of this module instead of the plain exports object. Requires 'Proxy' in the target environment, keeps every exported name, and costs runtime code, so enable it per module. Set it on the imported module, not on the importer.",
|
|
3042
|
+
"type": "boolean",
|
|
3043
|
+
"added": "5.111.0"
|
|
3044
|
+
},
|
|
2785
3045
|
"strictExportPresence": {
|
|
2786
3046
|
"description": "Deprecated in favor of \"exportsPresence\". Emit errors instead of warnings when imported names don't exist in imported module.",
|
|
2787
3047
|
"type": "boolean",
|
|
@@ -3296,7 +3556,7 @@
|
|
|
3296
3556
|
]
|
|
3297
3557
|
},
|
|
3298
3558
|
"exprContextCritical": {
|
|
3299
|
-
"description": "Enable warnings for full dynamic dependencies.",
|
|
3559
|
+
"description": "Enable warnings for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextCritical'.",
|
|
3300
3560
|
"type": "boolean",
|
|
3301
3561
|
"deprecated": true
|
|
3302
3562
|
},
|
|
@@ -3603,7 +3863,7 @@
|
|
|
3603
3863
|
"type": "boolean"
|
|
3604
3864
|
},
|
|
3605
3865
|
"minimize": {
|
|
3606
|
-
"description": "Enable minimizing the output. Uses optimization.minimizer. An object
|
|
3866
|
+
"description": "Enable minimizing the output. Uses optimization.minimizer. An options object implies 'true' and sets optimization.minimizeOptions.",
|
|
3607
3867
|
"anyOf": [
|
|
3608
3868
|
{
|
|
3609
3869
|
"type": "boolean"
|
|
@@ -3613,6 +3873,9 @@
|
|
|
3613
3873
|
}
|
|
3614
3874
|
]
|
|
3615
3875
|
},
|
|
3876
|
+
"minimizeOptions": {
|
|
3877
|
+
"$ref": "#/definitions/OptimizationMinimizeOptions"
|
|
3878
|
+
},
|
|
3616
3879
|
"minimizer": {
|
|
3617
3880
|
"description": "Minimizer(s) to use for minimizing the output.",
|
|
3618
3881
|
"type": "array",
|
|
@@ -3723,6 +3986,11 @@
|
|
|
3723
3986
|
"type": "object",
|
|
3724
3987
|
"additionalProperties": false,
|
|
3725
3988
|
"properties": {
|
|
3989
|
+
"colorFallbacks": {
|
|
3990
|
+
"description": "Write a color the `browserslist` target cannot read as an extra declaration before the one naming it, in a spelling it does read: `color: oklch(59.686% 0.15619 49.7694)` is written as `color: #c65d06` and then the `oklch()` itself, so an engine reading neither the Lab family nor `hwb()` is left with a color rather than with nothing. The fallback is that color clipped into the sRGB gamut and rounded, which the declaration standing after it corrects wherever it is read. Nothing is written where the author already set the property earlier in the same block, where the color holds a substitution or a relative reference this cannot fold, or where the fallback would still name a function the target cannot read. On by default, and only in effect for a `browserslist` target — any other target names no browsers to answer for.",
|
|
3991
|
+
"type": "boolean",
|
|
3992
|
+
"added": "5.111.0"
|
|
3993
|
+
},
|
|
3726
3994
|
"comments": {
|
|
3727
3995
|
"description": "Which comments survive. `\"some\"`, the default, keeps a `/*!` banner and a comment annotated `@license` or `@preserve`; `true` (or `\"all\"`) keeps every comment and `false` keeps none; a string is read as a regular expression source, and it, a `RegExp` or a `(comment) => boolean` predicate is asked about each comment's own text and keeps the ones it accepts — standing in for the default rule rather than beside it, as terser's `format.comments` does, so a pattern that names nothing else drops the ones `\"some\"` would have kept. A `/*#` source-map pragma is a link rather than a comment, so `\"some\"` and `\"all\"` keep it; `false`, a pattern or a predicate decides it like any other. A predicate is handed to the minimizer's worker pool as source, so it must not close over anything.",
|
|
3728
3996
|
"anyOf": [
|
|
@@ -3751,6 +4019,21 @@
|
|
|
3751
4019
|
"type": "boolean",
|
|
3752
4020
|
"added": "5.110.0"
|
|
3753
4021
|
},
|
|
4022
|
+
"foldCase": {
|
|
4023
|
+
"description": "Write a name that matches ASCII case-insensitively in lowercase: an at-rule name, a property name, a pseudo-class or pseudo-element name, a function name, a unit, and a keyword standing in a value whose grammar takes keywords alone. `@MEDIA`, `COLOR`, `:NTH-CHILD`, `URL(`, `1PX` and `currentColor` become `@media`, `color`, `:nth-child`, `url(`, `1px` and `currentcolor`. On by default, and exact: CSS matches every one of these ASCII case-insensitively, so the fold names the same thing. What it never touches is a name the author chose — a custom property, a custom ident such as an animation or grid-area name, an id, a class, a type selector, an attribute's value, or anything inside a substituted value. `@charset` is left as written, being read as bytes rather than matched, and `!important` is always written in lowercase because the printer writes the keyword rather than copying it.",
|
|
4024
|
+
"type": "boolean",
|
|
4025
|
+
"added": "5.111.0"
|
|
4026
|
+
},
|
|
4027
|
+
"lowerUnsupported": {
|
|
4028
|
+
"description": "Write a spelling the `browserslist` target cannot read as one it can — the same value said another way, rather than left for an engine that will drop it: a 4-/8-digit hex as `rgba()`, a double-position gradient stop as the two stops it names, `inset` / `overflow` / `place-*` as the longhands they set, `text-decoration` as its own longhands where a slot is newer than the shorthand, `system-ui` as the stack of platform font names it stands for, a `:lang()` or `:not()` holding a list as the `:is()` that means it, a media feature range as the `min-`/`max-` pair, and `light-dark()` as the custom-property pair a color scheme switches. On by default, and only in effect for a `browserslist` target — any other target names no browsers to answer for. Off leaves every such spelling as written, which is how a stylesheet one of these rewrites gets wrong is minified; it never makes the minifier write a spelling the target cannot read.",
|
|
4029
|
+
"type": "boolean",
|
|
4030
|
+
"added": "5.111.0"
|
|
4031
|
+
},
|
|
4032
|
+
"mergeDistantRules": {
|
|
4033
|
+
"description": "Give a rule the selectors of a later one printing the same block, past the rules standing between them. Off by default because it reorders the cascade, so it holds only where nothing between the two declares a property the shared block does. A block repeated at a distance already compresses on its own, so the join is taken only where the copy of the block it drops is worth more than twice the selector it writes instead. `mergeRules` is the safe half of this, joining only what nothing stands between.",
|
|
4034
|
+
"type": "boolean",
|
|
4035
|
+
"added": "5.111.0"
|
|
4036
|
+
},
|
|
3754
4037
|
"mergeLonghands": {
|
|
3755
4038
|
"description": "Write a family of longhands as the one shorthand that sets them — four sides or corners, the two a pair shorthand sets, or the slots of an order-free one — even where unrelated declarations stand between them. On by default.",
|
|
3756
4039
|
"type": "boolean",
|
|
@@ -3766,28 +4049,53 @@
|
|
|
3766
4049
|
"type": "boolean",
|
|
3767
4050
|
"added": "5.110.0"
|
|
3768
4051
|
},
|
|
4052
|
+
"pseudoClasses": {
|
|
4053
|
+
"description": "Each pseudo-class to write as an ordinary class instead, as `{ \"focus-visible\": \"focus-visible\" }` — so a script can apply the class where the engine reads no such pseudo. Only a plain pseudo-class is rewritten, wherever it stands in a selector: a pseudo-element (`::hover`) and a functional pseudo of the same name (`:hover(…)`) are not what a class stands in for, and a `:name` inside a quoted attribute value is nobody's pseudo. Nothing applies the class — that is the script's part.",
|
|
4054
|
+
"type": "object",
|
|
4055
|
+
"additionalProperties": {
|
|
4056
|
+
"description": "The class to write instead, without its `.`.",
|
|
4057
|
+
"type": "string",
|
|
4058
|
+
"minLength": 1
|
|
4059
|
+
},
|
|
4060
|
+
"added": "5.111.0"
|
|
4061
|
+
},
|
|
3769
4062
|
"reduceFunctions": {
|
|
3770
4063
|
"description": "Compute a call into the shorter call naming the same value: `calc()` and every math function over constants, a transform naming one axis or an identity, a gradient's default direction and its implied stops, an easing function that has a keyword, and a filter function given the amount an omitted argument already means. On by default.",
|
|
3771
4064
|
"type": "boolean",
|
|
3772
4065
|
"added": "5.110.0"
|
|
3773
4066
|
},
|
|
3774
4067
|
"removeDeadRules": {
|
|
3775
|
-
"description": "Drop a rule or declaration nothing can read: a rule whose block ends up empty, a declaration
|
|
4068
|
+
"description": "Drop a rule or declaration nothing can read: a rule whose block ends up empty, a declaration a later one in the same block overrides, a rule an identical later sibling makes dead, and the `@charset` naming an encoding the output is not written in. On by default. Joining rules that are not dead is `mergeRules`.",
|
|
3776
4069
|
"type": "boolean",
|
|
3777
4070
|
"added": "5.110.0"
|
|
3778
4071
|
},
|
|
4072
|
+
"resolveCustomAtRules": {
|
|
4073
|
+
"description": "Resolve the `@custom-media` and `@custom-selector` at-rules: write the query or the selector list a name stands for wherever one asks for it, and drop the rule that named it. `@custom-media --wide (width>400px)` with `@media (--wide)` becomes `@media (width>400px)`, and `@custom-selector :--heading h1, h2` with `:--heading` becomes `:is(h1, h2)`. Off until asked for: `module.parser.css.customMedia` and `module.parser.css.customSelectors` already resolve both in every stylesheet webpack parses, so this is for a `.css` asset that reached the minimizer without being parsed — one emitted by `asset/resource` or copied in. Only a name stated before the rule asking for it is written out — the rules are read in the order they are written — and a rule naming one this has not come to is left as the author had it. A selector list is written as `:is(…)`, so a name is substituted only where the target reads `:is()`.",
|
|
4074
|
+
"type": "boolean",
|
|
4075
|
+
"added": "5.111.0"
|
|
4076
|
+
},
|
|
3779
4077
|
"rewriteCustomProperties": {
|
|
3780
4078
|
"description": "Shorten the values of custom properties (`--x: #ffffff` -> `#fff`, `--y: 0.5rem` -> `.5rem`), which are otherwise written back exactly as authored. Off by default: `getComputedStyle().getPropertyValue()` hands this text back, so a rewritten value is a different CSSOM — the one place a declaration's authored text survives. What it may rewrite is exactly what any other value's tokens may be, a color in a substitution's fallback included — that fallback being the property's value rather than the function's own argument.",
|
|
3781
4079
|
"type": "boolean",
|
|
3782
4080
|
"added": "5.110.0"
|
|
3783
4081
|
},
|
|
4082
|
+
"rewriteDirSelector": {
|
|
4083
|
+
"description": "Write a `:dir()` the `browserslist` target cannot read as the `[dir]` attribute selector it approximates: `a:dir(rtl)` becomes `a[dir=rtl]`. Off until asked for, because the two are not the same question — `:dir()` reads the directionality an element resolves to, which it may inherit from an ancestor, while `[dir=rtl]` reads the attribute on the element itself, so an element inside a `dir=\"rtl\"` ancestor matches the first and not the second. Only in effect for a `browserslist` target that reads no `:dir()`; any other target names no browsers to answer for.",
|
|
4084
|
+
"type": "boolean",
|
|
4085
|
+
"added": "5.111.0"
|
|
4086
|
+
},
|
|
4087
|
+
"rewriteEscapes": {
|
|
4088
|
+
"description": "Write an escaped identifier the shortest way that names the same thing, in a value or an id: `grid-area:\\66oot` becomes `grid-area:foot` and `#\\41 x` becomes `#Ax`. On by default, and exact: the escape and what replaces it are the same identifier. Off leaves every escape as the author wrote it, which is what a consumer comparing the text rather than reading the identifier needs.",
|
|
4089
|
+
"type": "boolean",
|
|
4090
|
+
"added": "5.111.0"
|
|
4091
|
+
},
|
|
3784
4092
|
"shortenColors": {
|
|
3785
4093
|
"description": "Write each color in the shortest spelling of the same value: `#ffffff` -> `#fff`, `rgb(1 2 3)` -> `#010203`, a named color where the property takes no identifier of the author's own, and every polar and Lab function the target agrees with hex on. On by default.",
|
|
3786
4094
|
"type": "boolean",
|
|
3787
4095
|
"added": "5.110.0"
|
|
3788
4096
|
},
|
|
3789
4097
|
"shortenMediaQueries": {
|
|
3790
|
-
"description": "
|
|
4098
|
+
"description": "Shorten a rule's condition prelude: a media feature in its range spelling where the target reads one (`(min-width:100px)` -> `(width>=100px)`), an `and` of two one-sided ranges collapsed into the interval it describes, the `all` a query states before an `and` (which matches what the condition alone matches), and an operand a condition already states — in `@supports` and `@container` as well as `@media`. On by default.",
|
|
3791
4099
|
"type": "boolean",
|
|
3792
4100
|
"added": "5.110.0"
|
|
3793
4101
|
},
|
|
@@ -3806,6 +4114,16 @@
|
|
|
3806
4114
|
"type": "boolean",
|
|
3807
4115
|
"added": "5.110.0"
|
|
3808
4116
|
},
|
|
4117
|
+
"unusedSymbols": {
|
|
4118
|
+
"description": "Names a whole-project analysis found nothing uses, which the minimizer then takes out: a bare name is matched against every class and id a selector names and against every `@keyframes` name, and a `--`-prefixed one against every custom property a declaration sets. A selector list keeps the selectors that do not name one, and a rule left with none goes; a name inside a functional pseudo (`:not(.gone)`, `:is(.gone, .kept)`) is not one the rule needs, so it is left alone. Nothing is derived here — the list is the caller's, and a name on it that something does use takes working CSS out.",
|
|
4119
|
+
"type": "array",
|
|
4120
|
+
"items": {
|
|
4121
|
+
"description": "A class, id, `@keyframes` or custom property name nothing uses.",
|
|
4122
|
+
"type": "string",
|
|
4123
|
+
"minLength": 1
|
|
4124
|
+
},
|
|
4125
|
+
"added": "5.111.0"
|
|
4126
|
+
},
|
|
3809
4127
|
"vendorPrefixes": {
|
|
3810
4128
|
"description": "Maintain vendor prefixes for the `browserslist` target: add the `-webkit-` / `-moz-` / `-ms-` spelling of a property, at-rule or pseudo-selector that a selected browser still needs, and drop one none of them does. On by default, and only in effect for a `browserslist` target — any other target names no browsers to prefix for. A browserslist name no compat dataset covers (`op_mini`, `and_uc`, `and_qq`, `baidu`, `kaios`, `bb`) is skipped, and a selection of nothing but those prefixes for no one.",
|
|
3811
4129
|
"type": "boolean",
|
|
@@ -3820,8 +4138,15 @@
|
|
|
3820
4138
|
"additionalProperties": false,
|
|
3821
4139
|
"properties": {
|
|
3822
4140
|
"collapseBooleanAttributes": {
|
|
3823
|
-
"description": "Write a boolean attribute
|
|
3824
|
-
"
|
|
4141
|
+
"description": "Write a boolean attribute as the bare name its presence already means. The DOM reads `checked` from the attribute being there and never from its value, so `checked=\"checked\"` and `checked=\"\"` are the same element — but `getAttribute` hands back what was written. `true`, the default, rewrites only the spelling the spec itself canonicalizes, the attribute's own name; `\"all\"` rewrites any value, including the `checked=\"false\"` that already means checked.",
|
|
4142
|
+
"anyOf": [
|
|
4143
|
+
{
|
|
4144
|
+
"enum": ["all"]
|
|
4145
|
+
},
|
|
4146
|
+
{
|
|
4147
|
+
"type": "boolean"
|
|
4148
|
+
}
|
|
4149
|
+
],
|
|
3825
4150
|
"added": "5.110.0"
|
|
3826
4151
|
},
|
|
3827
4152
|
"collapseWhitespace": {
|
|
@@ -3859,6 +4184,11 @@
|
|
|
3859
4184
|
],
|
|
3860
4185
|
"added": "5.110.0"
|
|
3861
4186
|
},
|
|
4187
|
+
"mergeScripts": {
|
|
4188
|
+
"description": "Print a run of adjacent `<script>` elements as one, joined by a newline and a `;`. Only bare ones fold — any attribute at all, a `src`, `type`, `nonce`, `async` or `id` among them, says the two are not interchangeable with one — and only where the print writes the bodies itself, so a `<script>` that `output.html.inline` fills in after the print is left alone. A body is left alone too wherever appending it would change what it means: one still inside a string, template or block comment would swallow the next, and a directive prologue, a hashbang or a leading `-->` mean what they do only at a start the appended body no longer has. Off by default: it removes elements, so `document.scripts`, a `script:nth-child()` selector and `querySelectorAll(\"script\").length` all read a different document; a later body's `var` and `function` declarations become visible to the bodies before it; and a body that throws takes the rest of its run with it rather than only itself, while one that does not parse takes the whole run, its own code included.",
|
|
4189
|
+
"type": "boolean",
|
|
4190
|
+
"added": "5.111.0"
|
|
4191
|
+
},
|
|
3862
4192
|
"mergeStyles": {
|
|
3863
4193
|
"description": "Print a run of adjacent `<style>` elements as one sheet. Off by default: it removes elements, so `document.styleSheets`, a `style:nth-child()` selector and `querySelectorAll(\"style\").length` all read a different document. A sheet the CSS minifier does not accept is never folded — appending to one that may be unterminated would make the next sheet part of its last rule — and neither is one led by `@import` / `@charset` / `@namespace`, which apply only at the top of a sheet.",
|
|
3864
4194
|
"type": "boolean",
|
|
@@ -3869,21 +4199,6 @@
|
|
|
3869
4199
|
"type": "boolean",
|
|
3870
4200
|
"added": "5.110.0"
|
|
3871
4201
|
},
|
|
3872
|
-
"minifyJson": {
|
|
3873
|
-
"description": "Strip the whitespace between the tokens of a `<script>` whose type is a JSON MIME type. Every literal is copied byte for byte, so no number is rounded and no escape rewritten. On by default.",
|
|
3874
|
-
"type": "boolean",
|
|
3875
|
-
"added": "5.110.0"
|
|
3876
|
-
},
|
|
3877
|
-
"minifySrcdoc": {
|
|
3878
|
-
"description": "Minify the document held in an `<iframe srcdoc>` attribute. Off by default: the body is a whole document of its own (its base URL is `about:srcdoc`), so minifying it is safe, but the attribute is readable from script and a consumer comparing `iframe.srcdoc` byte for byte would see it change.",
|
|
3879
|
-
"type": "boolean",
|
|
3880
|
-
"added": "5.110.0"
|
|
3881
|
-
},
|
|
3882
|
-
"minifyStyles": {
|
|
3883
|
-
"description": "Run the CSS minimizer over an inline `<style>` element and every `style=\"\"` attribute, with the options `optimization.minimize.css` names. On by default.",
|
|
3884
|
-
"type": "boolean",
|
|
3885
|
-
"added": "5.110.0"
|
|
3886
|
-
},
|
|
3887
4202
|
"normalizeAttributeQuotes": {
|
|
3888
4203
|
"description": "Write an attribute value with whichever delimiters cost least — bare where the grammar allows it, else under the quote that needs fewer character references. On by default: the DOM reads the same value either way.",
|
|
3889
4204
|
"type": "boolean",
|
|
@@ -3895,7 +4210,7 @@
|
|
|
3895
4210
|
"added": "5.110.0"
|
|
3896
4211
|
},
|
|
3897
4212
|
"normalizeListAttributes": {
|
|
3898
|
-
"description": "Normalize a list-shaped attribute value: a space-separated token list (`class`, `rel`, `part`, …), a comma-separated one (`accept`, `sizes`, …), a `srcset` and the viewport `<meta content>`. On by default. Reordering a token list is `sortTokenLists`, which is separate and off by default.",
|
|
4213
|
+
"description": "Normalize a list-shaped attribute value: a space-separated token list (`class`, `rel`, `part`, …), a comma-separated one (`accept`, `sizes`, …), a `srcset` and the viewport `<meta content>`. On by default. A list is read as the set the DOM reflects, so a repeat folds away, only where every token of it is a word: one holding a delimiter another language wrote a statement in is text, and keeps every token it names. Reordering a token list is `sortTokenLists`, which is separate and off by default.",
|
|
3899
4214
|
"type": "boolean",
|
|
3900
4215
|
"added": "5.110.0"
|
|
3901
4216
|
},
|
|
@@ -3904,6 +4219,11 @@
|
|
|
3904
4219
|
"type": "boolean",
|
|
3905
4220
|
"added": "5.110.0"
|
|
3906
4221
|
},
|
|
4222
|
+
"normalizeUrlAttributes": {
|
|
4223
|
+
"description": "Drop the ASCII whitespace around a URL value (`href`, `src`, `action`, `poster`, …), which resolving the URL skips over, so the request goes to the same place either way. On by default: `getAttribute` hands back the attribute as written, so a script comparing those bytes is the one this is turned off for.",
|
|
4224
|
+
"type": "boolean",
|
|
4225
|
+
"added": "5.111.0"
|
|
4226
|
+
},
|
|
3907
4227
|
"removeEmptyAttributes": {
|
|
3908
4228
|
"description": "Drop an attribute whose empty or all-whitespace value leaves it in the state its absence gives: the globals `class`, `id`, `style`, `dir`, `accesskey`, `itemprop`, `itemref`, `itemtype` and `part`, and every attribute reflecting a token list on the elements the spec defines it for — `rel` on `<a>`, `<area>`, `<form>` and `<link>`, `ping` on `<a>` and `<area>`, `headers` on `<td>` and `<th>`, `blocking` on `<link>`, `<script>` and `<style>`, `sizes` on `<link>`, `for` on `<output>` — where an empty list is no tokens. Anywhere else that spelling is an author attribute whose meaning is a script's, so `<x-foo rel=\"\">` and `<label for=\"\">` keep it. Off by default: an attribute selector matches on presence, so `[class]` stops matching. Never dropped: `title` and `lang`, whose empty value means what absence does not; `sandbox`, whose empty list is the most restrictive state an `<iframe>` has; and an event handler, whose empty body still compiles to a function where absence reads null.",
|
|
3909
4229
|
"type": "boolean",
|
|
@@ -3949,7 +4269,7 @@
|
|
|
3949
4269
|
"added": "5.110.0"
|
|
3950
4270
|
},
|
|
3951
4271
|
"sortTokenLists": {
|
|
3952
|
-
"description": "Print every space-separated token list the DOM reads as a set — `class`, `rel`, `part`, `sandbox`, `blocking`, `itemprop` / `itemref` / `itemtype`, `<output for>` and `<link sizes>` — in token order. Nothing matching those reads order, so this only makes the same markup compress better across pages. Off by default: a script reading `className` or `rel` back sees the new order. The lists the DOM does not read as a set are left alone whatever this says — `ping` is the order its requests go out in and `accesskey` the order its keys are tried.",
|
|
4272
|
+
"description": "Print every space-separated token list the DOM reads as a set — `class`, `rel`, `part`, `sandbox`, `blocking`, `itemprop` / `itemref` / `itemtype`, `<output for>` and `<link sizes>` — in token order. Nothing matching those reads order, so this only makes the same markup compress better across pages. Off by default: a script reading `className` or `rel` back sees the new order. Asked for on its own: a list this reorders is rewritten whether or not `normalizeListAttributes` is on, since another order is another spelling. The lists the DOM does not read as a set are left alone whatever this says — `ping` is the order its requests go out in and `accesskey` the order its keys are tried.",
|
|
3953
4273
|
"type": "boolean",
|
|
3954
4274
|
"added": "5.110.0"
|
|
3955
4275
|
}
|
|
@@ -4074,15 +4394,11 @@
|
|
|
4074
4394
|
"type": "boolean"
|
|
4075
4395
|
},
|
|
4076
4396
|
"minimize": {
|
|
4077
|
-
"description": "Enable minimizing the output. Uses optimization.minimizer.
|
|
4078
|
-
"
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
{
|
|
4083
|
-
"$ref": "#/definitions/OptimizationMinimizeOptions"
|
|
4084
|
-
}
|
|
4085
|
-
]
|
|
4397
|
+
"description": "Enable minimizing the output. Uses optimization.minimizer.",
|
|
4398
|
+
"type": "boolean"
|
|
4399
|
+
},
|
|
4400
|
+
"minimizeOptions": {
|
|
4401
|
+
"$ref": "#/definitions/OptimizationMinimizeOptions"
|
|
4086
4402
|
},
|
|
4087
4403
|
"minimizer": {
|
|
4088
4404
|
"description": "Minimizer(s) to use for minimizing the output.",
|
|
@@ -4771,6 +5087,9 @@
|
|
|
4771
5087
|
"compareBeforeEmit": {
|
|
4772
5088
|
"$ref": "#/definitions/CompareBeforeEmit"
|
|
4773
5089
|
},
|
|
5090
|
+
"copy": {
|
|
5091
|
+
"$ref": "#/definitions/Copy"
|
|
5092
|
+
},
|
|
4774
5093
|
"crossOriginLoading": {
|
|
4775
5094
|
"$ref": "#/definitions/CrossOriginLoading"
|
|
4776
5095
|
},
|
|
@@ -5212,6 +5531,9 @@
|
|
|
5212
5531
|
"compareBeforeEmit": {
|
|
5213
5532
|
"$ref": "#/definitions/CompareBeforeEmit"
|
|
5214
5533
|
},
|
|
5534
|
+
"copy": {
|
|
5535
|
+
"$ref": "#/definitions/CopyOptions"
|
|
5536
|
+
},
|
|
5215
5537
|
"crossOriginLoading": {
|
|
5216
5538
|
"$ref": "#/definitions/CrossOriginLoading"
|
|
5217
5539
|
},
|
|
@@ -5460,6 +5782,11 @@
|
|
|
5460
5782
|
"type": "boolean",
|
|
5461
5783
|
"added": "5.110.0"
|
|
5462
5784
|
},
|
|
5785
|
+
"analyzableBailouts": {
|
|
5786
|
+
"description": "Report references in ESM output that keep webpack's runtime form, naming what stops each from being written as a literal 'import()' or 'new URL()' another bundler can follow (requires 'hints' to be enabled).",
|
|
5787
|
+
"type": "boolean",
|
|
5788
|
+
"added": "5.111.0"
|
|
5789
|
+
},
|
|
5463
5790
|
"assetFilter": {
|
|
5464
5791
|
"description": "Filter function to select assets that are checked.",
|
|
5465
5792
|
"instanceof": "Function",
|
|
@@ -5505,16 +5832,6 @@
|
|
|
5505
5832
|
"type": "boolean",
|
|
5506
5833
|
"added": "5.110.0"
|
|
5507
5834
|
},
|
|
5508
|
-
"embeddedSourceMaps": {
|
|
5509
|
-
"description": "Report a production build whose 'devtool' writes the source map into the JavaScript, so everyone loading the page downloads it (requires 'hints' to be enabled).",
|
|
5510
|
-
"type": "boolean",
|
|
5511
|
-
"added": "5.110.0"
|
|
5512
|
-
},
|
|
5513
|
-
"entrypointOverlap": {
|
|
5514
|
-
"description": "Report modules shipped by more than one entrypoint, which every page that loads them downloads again (requires 'hints' to be enabled).",
|
|
5515
|
-
"type": "boolean",
|
|
5516
|
-
"added": "5.110.0"
|
|
5517
|
-
},
|
|
5518
5835
|
"evalUsage": {
|
|
5519
5836
|
"description": "Report modules that call 'eval' directly, which stops minification, scope hoisting and tree shaking (requires 'hints' to be enabled).",
|
|
5520
5837
|
"type": "boolean",
|
|
@@ -5582,6 +5899,11 @@
|
|
|
5582
5899
|
"type": "boolean",
|
|
5583
5900
|
"added": "5.110.0"
|
|
5584
5901
|
},
|
|
5902
|
+
"sourceMaps": {
|
|
5903
|
+
"description": "Report source maps that cost more than they give: a production 'devtool' that writes the map into the JavaScript, and modules a loader transformed without returning a map, which leaves positions pointing at the loader's output (requires 'hints' to be enabled).",
|
|
5904
|
+
"type": "boolean",
|
|
5905
|
+
"added": "5.111.0"
|
|
5906
|
+
},
|
|
5585
5907
|
"splitChunksCapped": {
|
|
5586
5908
|
"description": "Report splits 'optimization.splitChunks' refused because 'maxInitialRequests' or 'maxAsyncRequests' was already reached (requires 'hints' to be enabled).",
|
|
5587
5909
|
"type": "boolean",
|
|
@@ -5602,30 +5924,20 @@
|
|
|
5602
5924
|
"type": "boolean",
|
|
5603
5925
|
"added": "5.110.0"
|
|
5604
5926
|
},
|
|
5605
|
-
"
|
|
5606
|
-
"description": "Report '
|
|
5607
|
-
"type": "boolean",
|
|
5608
|
-
"added": "5.110.0"
|
|
5609
|
-
},
|
|
5610
|
-
"unusedDefines": {
|
|
5611
|
-
"description": "Report keys defined by 'DefinePlugin' that no module ever referenced, which cost a parser hook per module and invalidate the build when their value changes.",
|
|
5612
|
-
"type": "boolean",
|
|
5613
|
-
"added": "5.110.0"
|
|
5614
|
-
},
|
|
5615
|
-
"unusedExternals": {
|
|
5616
|
-
"description": "Report requests listed in 'externals' that no module ever imported, which usually means the request is misspelled and the real one got bundled instead.",
|
|
5927
|
+
"unusedAssets": {
|
|
5928
|
+
"description": "Report asset files emitted for an import whose binding nothing reads, so the bytes ship for nothing (requires 'hints' to be enabled).",
|
|
5617
5929
|
"type": "boolean",
|
|
5618
|
-
"added": "5.
|
|
5930
|
+
"added": "5.111.0"
|
|
5619
5931
|
},
|
|
5620
|
-
"
|
|
5621
|
-
"description": "Report
|
|
5932
|
+
"unusedConfig": {
|
|
5933
|
+
"description": "Report configuration that no build used: 'resolve.alias' entries nothing matched, 'DefinePlugin' keys nothing referenced, 'externals' nothing imported, 'module.rules' that never matched, and Module Federation 'shared' keys or 'remotes' nothing imported.",
|
|
5622
5934
|
"type": "boolean",
|
|
5623
|
-
"added": "5.
|
|
5935
|
+
"added": "5.111.0"
|
|
5624
5936
|
},
|
|
5625
|
-
"
|
|
5626
|
-
"description": "Report
|
|
5937
|
+
"unusedModules": {
|
|
5938
|
+
"description": "Report modules bundled although nothing uses what they export, naming the re-export or the side-effect statement that kept each one (requires 'hints' to be enabled).",
|
|
5627
5939
|
"type": "boolean",
|
|
5628
|
-
"added": "5.
|
|
5940
|
+
"added": "5.111.0"
|
|
5629
5941
|
}
|
|
5630
5942
|
}
|
|
5631
5943
|
},
|