Projekt

Obecné

Profil

Stáhnout (36.2 KB) Statistiky
| Větev: | Revize:
1 3a515b92 cagy
/**
2
 * This file was automatically generated.
3
 * DO NOT MODIFY BY HAND.
4
 * Run `yarn special-lint-fix` to update
5
 */
6
7
/**
8
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
9
 * via the `definition` "Entry".
10
 */
11
export type Entry = EntryDynamic | EntryStatic;
12
/**
13
 * A Function returning an entry object, an entry string, an entry array or a promise to these things.
14
 *
15
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
16
 * via the `definition` "EntryDynamic".
17
 */
18
export type EntryDynamic = () => EntryStatic | Promise<EntryStatic>;
19
/**
20
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
21
 * via the `definition` "EntryStatic".
22
 */
23
export type EntryStatic = EntryObject | EntryItem;
24
/**
25
 * A non-empty array of non-empty strings
26
 *
27
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
28
 * via the `definition` "NonEmptyArrayOfUniqueStringValues".
29
 */
30
export type NonEmptyArrayOfUniqueStringValues = string[];
31
/**
32
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
33
 * via the `definition` "EntryItem".
34
 */
35
export type EntryItem = string | NonEmptyArrayOfUniqueStringValues;
36
/**
37
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
38
 * via the `definition` "Externals".
39
 */
40
export type Externals =
41
	| ((
42
			context: string,
43
			request: string,
44
			callback: (err?: Error, result?: string) => void
45
	  ) => void)
46
	| ExternalItem
47
	| (
48
			| ((
49
					context: string,
50
					request: string,
51
					callback: (err?: Error, result?: string) => void
52
			  ) => void)
53
			| ExternalItem
54
	  )[];
55
/**
56
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
57
 * via the `definition` "ExternalItem".
58
 */
59
export type ExternalItem =
60
	| string
61
	| {
62
			/**
63
			 * The dependency used for the external
64
			 */
65
			[k: string]:
66
				| string
67
				| {
68
						[k: string]: any;
69
				  }
70
				| ArrayOfStringValues
71
				| boolean;
72
	  }
73
	| RegExp;
74
/**
75
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
76
 * via the `definition` "ArrayOfStringValues".
77
 */
78
export type ArrayOfStringValues = string[];
79
/**
80
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
81
 * via the `definition` "FilterTypes".
82
 */
83
export type FilterTypes = FilterItemTypes | FilterItemTypes[];
84
/**
85
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
86
 * via the `definition` "FilterItemTypes".
87
 */
88
export type FilterItemTypes = RegExp | string | ((value: string) => boolean);
89
/**
90
 * One or multiple rule conditions
91
 *
92
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
93
 * via the `definition` "RuleSetConditionOrConditions".
94
 */
95
export type RuleSetConditionOrConditions = RuleSetCondition | RuleSetConditions;
96
/**
97
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
98
 * via the `definition` "RuleSetCondition".
99
 */
100
export type RuleSetCondition =
101
	| RegExp
102
	| string
103
	| ((value: string) => boolean)
104
	| RuleSetConditions
105
	| {
106
			/**
107
			 * Logical AND
108
			 */
109
			and?: RuleSetConditions;
110
			/**
111
			 * Exclude all modules matching any of these conditions
112
			 */
113
			exclude?: RuleSetConditionOrConditions;
114
			/**
115
			 * Exclude all modules matching not any of these conditions
116
			 */
117
			include?: RuleSetConditionOrConditions;
118
			/**
119
			 * Logical NOT
120
			 */
121
			not?: RuleSetConditions;
122
			/**
123
			 * Logical OR
124
			 */
125
			or?: RuleSetConditions;
126
			/**
127
			 * Exclude all modules matching any of these conditions
128
			 */
129
			test?: RuleSetConditionOrConditions;
130
	  };
131
/**
132
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
133
 * via the `definition` "RuleSetConditions".
134
 */
135
export type RuleSetConditions = RuleSetCondition[];
136
/**
137
 * One or multiple rule conditions
138
 *
139
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
140
 * via the `definition` "RuleSetConditionOrConditionsAbsolute".
141
 */
142
export type RuleSetConditionOrConditionsAbsolute =
143
	| RuleSetConditionAbsolute
144
	| RuleSetConditionsAbsolute;
145
/**
146
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
147
 * via the `definition` "RuleSetConditionAbsolute".
148
 */
149
export type RuleSetConditionAbsolute =
150
	| RegExp
151
	| string
152
	| ((value: string) => boolean)
153
	| RuleSetConditionsAbsolute
154
	| {
155
			/**
156
			 * Logical AND
157
			 */
158
			and?: RuleSetConditionsAbsolute;
159
			/**
160
			 * Exclude all modules matching any of these conditions
161
			 */
162
			exclude?: RuleSetConditionOrConditionsAbsolute;
163
			/**
164
			 * Exclude all modules matching not any of these conditions
165
			 */
166
			include?: RuleSetConditionOrConditionsAbsolute;
167
			/**
168
			 * Logical NOT
169
			 */
170
			not?: RuleSetConditionsAbsolute;
171
			/**
172
			 * Logical OR
173
			 */
174
			or?: RuleSetConditionsAbsolute;
175
			/**
176
			 * Exclude all modules matching any of these conditions
177
			 */
178
			test?: RuleSetConditionOrConditionsAbsolute;
179
	  };
180
/**
181
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
182
 * via the `definition` "RuleSetConditionsAbsolute".
183
 */
184
export type RuleSetConditionsAbsolute = RuleSetConditionAbsolute[];
185
/**
186
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
187
 * via the `definition` "RuleSetLoader".
188
 */
189
export type RuleSetLoader = string;
190
/**
191
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
192
 * via the `definition` "RuleSetUse".
193
 */
194
export type RuleSetUse = RuleSetUseItem | Function | RuleSetUseItem[];
195
/**
196
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
197
 * via the `definition` "RuleSetUseItem".
198
 */
199
export type RuleSetUseItem =
200
	| RuleSetLoader
201
	| Function
202
	| {
203
			/**
204
			 * Unique loader identifier
205
			 */
206
			ident?: string;
207
			/**
208
			 * Loader name
209
			 */
210
			loader?: RuleSetLoader;
211
			/**
212
			 * Loader options
213
			 */
214
			options?: RuleSetQuery;
215
			/**
216
			 * Loader query
217
			 */
218
			query?: RuleSetQuery;
219
	  };
220
/**
221
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
222
 * via the `definition` "RuleSetQuery".
223
 */
224
export type RuleSetQuery =
225
	| {
226
			[k: string]: any;
227
	  }
228
	| string;
229
/**
230
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
231
 * via the `definition` "ArrayOfStringOrStringArrayValues".
232
 */
233
export type ArrayOfStringOrStringArrayValues = (string | string[])[];
234
/**
235
 * Function acting as plugin
236
 *
237
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
238
 * via the `definition` "WebpackPluginFunction".
239
 */
240
export type WebpackPluginFunction = (
241
	this: import("../lib/Compiler"),
242
	compiler: import("../lib/Compiler")
243
) => void;
244
/**
245
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
246
 * via the `definition` "RuleSetRules".
247
 */
248
export type RuleSetRules = RuleSetRule[];
249
250
export interface WebpackOptions {
251
	/**
252
	 * Set the value of `require.amd` and `define.amd`. Or disable AMD support.
253
	 */
254
	amd?:
255
		| false
256
		| {
257
				[k: string]: any;
258
		  };
259
	/**
260
	 * Report the first error as a hard error instead of tolerating it.
261
	 */
262
	bail?: boolean;
263
	/**
264
	 * Cache generated modules and chunks to improve performance for multiple incremental builds.
265
	 */
266
	cache?:
267
		| boolean
268
		| {
269
				[k: string]: any;
270
		  };
271
	/**
272
	 * The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
273
	 */
274
	context?: string;
275
	/**
276
	 * References to other configurations to depend on.
277
	 */
278
	dependencies?: string[];
279
	/**
280
	 * Options for the webpack-dev-server
281
	 */
282
	devServer?: {
283
		[k: string]: any;
284
	};
285
	/**
286
	 * A developer tool to enhance debugging.
287
	 */
288
	devtool?: string | false;
289
	/**
290
	 * The entry point(s) of the compilation.
291
	 */
292
	entry?: Entry;
293
	/**
294
	 * Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.
295
	 */
296
	externals?: Externals;
297
	/**
298
	 * Options for infrastructure level logging
299
	 */
300
	infrastructureLogging?: {
301
		/**
302
		 * Enable debug logging for specific loggers
303
		 */
304
		debug?: FilterTypes | boolean;
305
		/**
306
		 * Log level
307
		 */
308
		level?: "none" | "error" | "warn" | "info" | "log" | "verbose";
309
	};
310
	/**
311
	 * Custom values available in the loader context.
312
	 */
313
	loader?: {
314
		[k: string]: any;
315
	};
316
	/**
317
	 * Enable production optimizations or development hints.
318
	 */
319
	mode?: "development" | "production" | "none";
320
	/**
321
	 * Options affecting the normal modules (`NormalModuleFactory`).
322
	 */
323
	module?: ModuleOptions;
324
	/**
325
	 * Name of the configuration. Used when loading multiple configurations.
326
	 */
327
	name?: string;
328
	/**
329
	 * Include polyfills or mocks for various node stuff.
330
	 */
331
	node?: false | NodeOptions;
332
	/**
333
	 * Enables/Disables integrated optimizations
334
	 */
335
	optimization?: OptimizationOptions;
336
	/**
337
	 * Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
338
	 */
339
	output?: OutputOptions;
340
	/**
341
	 * The number of parallel processed modules in the compilation.
342
	 */
343
	parallelism?: number;
344
	/**
345
	 * Configuration for web performance recommendations.
346
	 */
347
	performance?: false | PerformanceOptions;
348
	/**
349
	 * Add additional plugins to the compiler.
350
	 */
351
	plugins?: (WebpackPluginInstance | WebpackPluginFunction)[];
352
	/**
353
	 * Capture timing information for each module.
354
	 */
355
	profile?: boolean;
356
	/**
357
	 * Store compiler state to a json file.
358
	 */
359
	recordsInputPath?: string;
360
	/**
361
	 * Load compiler state from a json file.
362
	 */
363
	recordsOutputPath?: string;
364
	/**
365
	 * Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. `recordsPath` is used for `recordsInputPath` and `recordsOutputPath` if they left undefined.
366
	 */
367
	recordsPath?: string;
368
	/**
369
	 * Options for the resolver
370
	 */
371
	resolve?: ResolveOptions;
372
	/**
373
	 * Options for the resolver when resolving loaders
374
	 */
375
	resolveLoader?: ResolveOptions;
376
	/**
377
	 * Options for webpack-serve
378
	 */
379
	serve?: {
380
		[k: string]: any;
381
	};
382
	/**
383
	 * Used by the webpack CLI program to pass stats options.
384
	 */
385
	stats?:
386
		| StatsOptions
387
		| boolean
388
		| (
389
				| "none"
390
				| "errors-only"
391
				| "minimal"
392
				| "normal"
393
				| "detailed"
394
				| "verbose"
395
				| "errors-warnings"
396
		  );
397
	/**
398
	 * Environment to build for
399
	 */
400
	target?:
401
		| (
402
				| "web"
403
				| "webworker"
404
				| "node"
405
				| "async-node"
406
				| "node-webkit"
407
				| "electron-main"
408
				| "electron-renderer"
409
				| "electron-preload"
410
		  )
411
		| ((compiler: import("../lib/Compiler")) => void);
412
	/**
413
	 * Enter watch mode, which rebuilds on file change.
414
	 */
415
	watch?: boolean;
416
	/**
417
	 * Options for the watcher
418
	 */
419
	watchOptions?: {
420
		/**
421
		 * Delay the rebuilt after the first change. Value is a time in ms.
422
		 */
423
		aggregateTimeout?: number;
424
		/**
425
		 * Ignore some files from watching
426
		 */
427
		ignored?: {
428
			[k: string]: any;
429
		};
430
		/**
431
		 * Enable polling mode for watching
432
		 */
433
		poll?: boolean | number;
434
		/**
435
		 * Stop watching when stdin stream has ended
436
		 */
437
		stdin?: boolean;
438
	};
439
}
440
/**
441
 * Multiple entry bundles are created. The key is the chunk name. The value can be a string or an array.
442
 *
443
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
444
 * via the `definition` "EntryObject".
445
 */
446
export interface EntryObject {
447
	/**
448
	 * An entry point with name
449
	 */
450
	[k: string]: string | NonEmptyArrayOfUniqueStringValues;
451
}
452
/**
453
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
454
 * via the `definition` "ModuleOptions".
455
 */
456
export interface ModuleOptions {
457
	/**
458
	 * An array of rules applied by default for modules.
459
	 */
460
	defaultRules?: RuleSetRules;
461
	/**
462
	 * Enable warnings for full dynamic dependencies
463
	 */
464
	exprContextCritical?: boolean;
465
	/**
466
	 * Enable recursive directory lookup for full dynamic dependencies
467
	 */
468
	exprContextRecursive?: boolean;
469
	/**
470
	 * Sets the default regular expression for full dynamic dependencies
471
	 */
472
	exprContextRegExp?: boolean | RegExp;
473
	/**
474
	 * Set the default request for full dynamic dependencies
475
	 */
476
	exprContextRequest?: string;
477
	/**
478
	 * Don't parse files matching. It's matched against the full resolved request.
479
	 */
480
	noParse?: RegExp[] | RegExp | Function | string[] | string;
481
	/**
482
	 * An array of rules applied for modules.
483
	 */
484
	rules?: RuleSetRules;
485
	/**
486
	 * Emit errors instead of warnings when imported names don't exist in imported module
487
	 */
488
	strictExportPresence?: boolean;
489
	/**
490
	 * Handle the this context correctly according to the spec for namespace objects
491
	 */
492
	strictThisContextOnImports?: boolean;
493
	/**
494
	 * Enable warnings when using the require function in a not statically analyse-able way
495
	 */
496
	unknownContextCritical?: boolean;
497
	/**
498
	 * Enable recursive directory lookup when using the require function in a not statically analyse-able way
499
	 */
500
	unknownContextRecursive?: boolean;
501
	/**
502
	 * Sets the regular expression when using the require function in a not statically analyse-able way
503
	 */
504
	unknownContextRegExp?: boolean | RegExp;
505
	/**
506
	 * Sets the request when using the require function in a not statically analyse-able way
507
	 */
508
	unknownContextRequest?: string;
509
	/**
510
	 * Cache the resolving of module requests
511
	 */
512
	unsafeCache?: boolean | Function;
513
	/**
514
	 * Enable warnings for partial dynamic dependencies
515
	 */
516
	wrappedContextCritical?: boolean;
517
	/**
518
	 * Enable recursive directory lookup for partial dynamic dependencies
519
	 */
520
	wrappedContextRecursive?: boolean;
521
	/**
522
	 * Set the inner regular expression for partial dynamic dependencies
523
	 */
524
	wrappedContextRegExp?: RegExp;
525
}
526
/**
527
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
528
 * via the `definition` "RuleSetRule".
529
 */
530
export interface RuleSetRule {
531
	/**
532
	 * Match the child compiler name
533
	 */
534
	compiler?: RuleSetConditionOrConditions;
535
	/**
536
	 * Enforce this rule as pre or post step
537
	 */
538
	enforce?: "pre" | "post";
539
	/**
540
	 * Shortcut for resource.exclude
541
	 */
542
	exclude?: RuleSetConditionOrConditionsAbsolute;
543
	/**
544
	 * Shortcut for resource.include
545
	 */
546
	include?: RuleSetConditionOrConditionsAbsolute;
547
	/**
548
	 * Match the issuer of the module (The module pointing to this module)
549
	 */
550
	issuer?: RuleSetConditionOrConditionsAbsolute;
551
	/**
552
	 * Shortcut for use.loader
553
	 */
554
	loader?: RuleSetLoader | RuleSetUse;
555
	/**
556
	 * Shortcut for use.loader
557
	 */
558
	loaders?: RuleSetUse;
559
	/**
560
	 * Only execute the first matching rule in this array
561
	 */
562
	oneOf?: RuleSetRules;
563
	/**
564
	 * Shortcut for use.options
565
	 */
566
	options?: RuleSetQuery;
567
	/**
568
	 * Options for parsing
569
	 */
570
	parser?: {
571
		[k: string]: any;
572
	};
573
	/**
574
	 * Shortcut for use.query
575
	 */
576
	query?: RuleSetQuery;
577
	/**
578
	 * Match rules with custom resource name
579
	 */
580
	realResource?: RuleSetConditionOrConditionsAbsolute;
581
	/**
582
	 * Options for the resolver
583
	 */
584
	resolve?: ResolveOptions;
585
	/**
586
	 * Match the resource path of the module
587
	 */
588
	resource?: RuleSetConditionOrConditionsAbsolute;
589
	/**
590
	 * Match the resource query of the module
591
	 */
592
	resourceQuery?: RuleSetConditionOrConditions;
593
	/**
594
	 * Match and execute these rules when this rule is matched
595
	 */
596
	rules?: RuleSetRules;
597
	/**
598
	 * Flags a module as with or without side effects
599
	 */
600
	sideEffects?: boolean;
601
	/**
602
	 * Shortcut for resource.test
603
	 */
604
	test?: RuleSetConditionOrConditionsAbsolute;
605
	/**
606
	 * Module type to use for the module
607
	 */
608
	type?:
609
		| "javascript/auto"
610
		| "javascript/dynamic"
611
		| "javascript/esm"
612
		| "json"
613
		| "webassembly/experimental";
614
	/**
615
	 * Modifiers applied to the module when rule is matched
616
	 */
617
	use?: RuleSetUse;
618
}
619
/**
620
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
621
 * via the `definition` "ResolveOptions".
622
 */
623
export interface ResolveOptions {
624
	/**
625
	 * Redirect module requests
626
	 */
627
	alias?:
628
		| {
629
				/**
630
				 * New request
631
				 */
632
				[k: string]: string;
633
		  }
634
		| {
635
				/**
636
				 * New request
637
				 */
638
				alias?: string;
639
				/**
640
				 * Request to be redirected
641
				 */
642
				name?: string;
643
				/**
644
				 * Redirect only exact matching request
645
				 */
646
				onlyModule?: boolean;
647
		  }[];
648
	/**
649
	 * Fields in the description file (package.json) which are used to redirect requests inside the module
650
	 */
651
	aliasFields?: ArrayOfStringOrStringArrayValues;
652
	/**
653
	 * Predicate function to decide which requests should be cached
654
	 */
655
	cachePredicate?: Function;
656
	/**
657
	 * Include the context information in the cache identifier when caching
658
	 */
659
	cacheWithContext?: boolean;
660
	/**
661
	 * Enable concord resolving extras
662
	 */
663
	concord?: boolean;
664
	/**
665
	 * Filenames used to find a description file
666
	 */
667
	descriptionFiles?: ArrayOfStringValues;
668
	/**
669
	 * Enforce using one of the extensions from the extensions option
670
	 */
671
	enforceExtension?: boolean;
672
	/**
673
	 * Enforce using one of the module extensions from the moduleExtensions option
674
	 */
675
	enforceModuleExtension?: boolean;
676
	/**
677
	 * Extensions added to the request when trying to find the file
678
	 */
679
	extensions?: ArrayOfStringValues;
680
	/**
681
	 * Filesystem for the resolver
682
	 */
683
	fileSystem?: {
684
		[k: string]: any;
685
	};
686
	/**
687
	 * Field names from the description file (package.json) which are used to find the default entry point
688
	 */
689
	mainFields?: ArrayOfStringOrStringArrayValues;
690
	/**
691
	 * Filenames used to find the default entry point if there is no description file or main field
692
	 */
693
	mainFiles?: ArrayOfStringValues;
694
	/**
695
	 * Extensions added to the module request when trying to find the module
696
	 */
697
	moduleExtensions?: ArrayOfStringValues;
698
	/**
699
	 * Folder names or directory paths where to find modules
700
	 */
701
	modules?: ArrayOfStringValues;
702
	/**
703
	 * Plugins for the resolver
704
	 */
705
	plugins?: (WebpackPluginInstance | WebpackPluginFunction)[];
706
	/**
707
	 * Custom resolver
708
	 */
709
	resolver?: {
710
		[k: string]: any;
711
	};
712
	/**
713
	 * Enable resolving symlinks to the original location
714
	 */
715
	symlinks?: boolean;
716
	/**
717
	 * Enable caching of successfully resolved requests
718
	 */
719
	unsafeCache?:
720
		| boolean
721
		| {
722
				[k: string]: any;
723
		  };
724
	/**
725
	 * Use synchronous filesystem calls for the resolver
726
	 */
727
	useSyncFileSystemCalls?: boolean;
728
}
729
/**
730
 * Plugin instance
731
 *
732
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
733
 * via the `definition` "WebpackPluginInstance".
734
 */
735
export interface WebpackPluginInstance {
736
	/**
737
	 * The run point of the plugin, required method.
738
	 */
739
	apply: (compiler: import("../lib/Compiler")) => void;
740
	[k: string]: any;
741
}
742
/**
743
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
744
 * via the `definition` "NodeOptions".
745
 */
746
export interface NodeOptions {
747
	/**
748
	 * Include a polyfill for the 'Buffer' variable
749
	 */
750
	Buffer?: false | true | "mock";
751
	/**
752
	 * Include a polyfill for the '__dirname' variable
753
	 */
754
	__dirname?: false | true | "mock";
755
	/**
756
	 * Include a polyfill for the '__filename' variable
757
	 */
758
	__filename?: false | true | "mock";
759
	/**
760
	 * Include a polyfill for the 'console' variable
761
	 */
762
	console?: false | true | "mock";
763
	/**
764
	 * Include a polyfill for the 'global' variable
765
	 */
766
	global?: boolean;
767
	/**
768
	 * Include a polyfill for the 'process' variable
769
	 */
770
	process?: false | true | "mock";
771
	/**
772
	 * Include a polyfill for the node.js module
773
	 */
774
	[k: string]: false | true | "mock" | "empty";
775
}
776
/**
777
 * Enables/Disables integrated optimizations
778
 *
779
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
780
 * via the `definition` "OptimizationOptions".
781
 */
782
export interface OptimizationOptions {
783
	/**
784
	 * Check for incompatible wasm types when importing/exporting from/to ESM
785
	 */
786
	checkWasmTypes?: boolean;
787
	/**
788
	 * Define the algorithm to choose chunk ids (named: readable ids for better debugging, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin)
789
	 */
790
	chunkIds?: "natural" | "named" | "size" | "total-size" | false;
791
	/**
792
	 * Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer
793
	 */
794
	concatenateModules?: boolean;
795
	/**
796
	 * Also flag chunks as loaded which contain a subset of the modules
797
	 */
798
	flagIncludedChunks?: boolean;
799
	/**
800
	 * Use hashed module id instead module identifiers for better long term caching (deprecated, used moduleIds: hashed instead)
801
	 */
802
	hashedModuleIds?: boolean;
803
	/**
804
	 * Reduce size of WASM by changing imports to shorter strings.
805
	 */
806
	mangleWasmImports?: boolean;
807
	/**
808
	 * Merge chunks which contain the same modules
809
	 */
810
	mergeDuplicateChunks?: boolean;
811
	/**
812
	 * Enable minimizing the output. Uses optimization.minimizer.
813
	 */
814
	minimize?: boolean;
815
	/**
816
	 * Minimizer(s) to use for minimizing the output
817
	 */
818
	minimizer?: (WebpackPluginInstance | WebpackPluginFunction)[];
819
	/**
820
	 * Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: short hashes as ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin)
821
	 */
822
	moduleIds?: "natural" | "named" | "hashed" | "size" | "total-size" | false;
823
	/**
824
	 * Use readable chunk identifiers for better debugging (deprecated, used chunkIds: named instead)
825
	 */
826
	namedChunks?: boolean;
827
	/**
828
	 * Use readable module identifiers for better debugging (deprecated, used moduleIds: named instead)
829
	 */
830
	namedModules?: boolean;
831
	/**
832
	 * Avoid emitting assets when errors occur
833
	 */
834
	noEmitOnErrors?: boolean;
835
	/**
836
	 * Set process.env.NODE_ENV to a specific value
837
	 */
838
	nodeEnv?: false | string;
839
	/**
840
	 * Figure out a order of modules which results in the smallest initial bundle
841
	 */
842
	occurrenceOrder?: boolean;
843
	/**
844
	 * Generate records with relative paths to be able to move the context folder
845
	 */
846
	portableRecords?: boolean;
847
	/**
848
	 * Figure out which exports are provided by modules to generate more efficient code
849
	 */
850
	providedExports?: boolean;
851
	/**
852
	 * Removes modules from chunks when these modules are already included in all parents
853
	 */
854
	removeAvailableModules?: boolean;
855
	/**
856
	 * Remove chunks which are empty
857
	 */
858
	removeEmptyChunks?: boolean;
859
	/**
860
	 * Create an additional chunk which contains only the webpack runtime and chunk hash maps
861
	 */
862
	runtimeChunk?:
863
		| boolean
864
		| ("single" | "multiple")
865
		| {
866
				/**
867
				 * The name or name factory for the runtime chunks
868
				 */
869
				name?: string | Function;
870
		  };
871
	/**
872
	 * Skip over modules which are flagged to contain no side effects when exports are not used
873
	 */
874
	sideEffects?: boolean;
875
	/**
876
	 * Optimize duplication and caching by splitting chunks by shared modules and cache group
877
	 */
878
	splitChunks?: false | OptimizationSplitChunksOptions;
879
	/**
880
	 * Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code
881
	 */
882
	usedExports?: boolean;
883
}
884
/**
885
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
886
 * via the `definition` "OptimizationSplitChunksOptions".
887
 */
888
export interface OptimizationSplitChunksOptions {
889
	/**
890
	 * Sets the name delimiter for created chunks
891
	 */
892
	automaticNameDelimiter?: string;
893
	/**
894
	 * Sets the max length for the name of a created chunk
895
	 */
896
	automaticNameMaxLength?: number;
897
	/**
898
	 * Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks)
899
	 */
900
	cacheGroups?: {
901
		/**
902
		 * Configuration for a cache group
903
		 */
904
		[k: string]:
905
			| false
906
			| Function
907
			| string
908
			| RegExp
909
			| {
910
					/**
911
					 * Sets the name delimiter for created chunks
912
					 */
913
					automaticNameDelimiter?: string;
914
					/**
915
					 * Sets the max length for the name of a created chunk
916
					 */
917
					automaticNameMaxLength?: number;
918
					/**
919
					 * Sets the name prefix for created chunks
920
					 */
921
					automaticNamePrefix?: string;
922
					/**
923
					 * Select chunks for determining cache group content (defaults to "initial", "initial" and "all" requires adding these chunks to the HTML)
924
					 */
925
					chunks?: ("initial" | "async" | "all") | Function;
926
					/**
927
					 * Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group
928
					 */
929
					enforce?: boolean;
930
					/**
931
					 * Sets the template for the filename for created chunks (Only works for initial chunks)
932
					 */
933
					filename?: string;
934
					/**
935
					 * Maximum number of requests which are accepted for on-demand loading
936
					 */
937
					maxAsyncRequests?: number;
938
					/**
939
					 * Maximum number of initial chunks which are accepted for an entry point
940
					 */
941
					maxInitialRequests?: number;
942
					/**
943
					 * Maximal size hint for the created chunks
944
					 */
945
					maxSize?: number;
946
					/**
947
					 * Minimum number of times a module has to be duplicated until it's considered for splitting
948
					 */
949
					minChunks?: number;
950
					/**
951
					 * Minimal size for the created chunk
952
					 */
953
					minSize?: number;
954
					/**
955
					 * Give chunks for this cache group a name (chunks with equal name are merged)
956
					 */
957
					name?: boolean | Function | string;
958
					/**
959
					 * Priority of this cache group
960
					 */
961
					priority?: number;
962
					/**
963
					 * Try to reuse existing chunk (with name) when it has matching modules
964
					 */
965
					reuseExistingChunk?: boolean;
966
					/**
967
					 * Assign modules to a cache group
968
					 */
969
					test?: Function | string | RegExp;
970
			  };
971
	};
972
	/**
973
	 * Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML)
974
	 */
975
	chunks?: ("initial" | "async" | "all") | Function;
976
	/**
977
	 * Options for modules not selected by any other cache group
978
	 */
979
	fallbackCacheGroup?: {
980
		/**
981
		 * Sets the name delimiter for created chunks
982
		 */
983
		automaticNameDelimiter?: string;
984
		/**
985
		 * Maximal size hint for the created chunks
986
		 */
987
		maxSize?: number;
988
		/**
989
		 * Minimal size for the created chunk
990
		 */
991
		minSize?: number;
992
	};
993
	/**
994
	 * Sets the template for the filename for created chunks (Only works for initial chunks)
995
	 */
996
	filename?: string;
997
	/**
998
	 * Prevents exposing path info when creating names for parts splitted by maxSize
999
	 */
1000
	hidePathInfo?: boolean;
1001
	/**
1002
	 * Maximum number of requests which are accepted for on-demand loading
1003
	 */
1004
	maxAsyncRequests?: number;
1005
	/**
1006
	 * Maximum number of initial chunks which are accepted for an entry point
1007
	 */
1008
	maxInitialRequests?: number;
1009
	/**
1010
	 * Maximal size hint for the created chunks
1011
	 */
1012
	maxSize?: number;
1013
	/**
1014
	 * Minimum number of times a module has to be duplicated until it's considered for splitting
1015
	 */
1016
	minChunks?: number;
1017
	/**
1018
	 * Minimal size for the created chunks
1019
	 */
1020
	minSize?: number;
1021
	/**
1022
	 * Give chunks created a name (chunks with equal name are merged)
1023
	 */
1024
	name?: boolean | Function | string;
1025
}
1026
/**
1027
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
1028
 * via the `definition` "OutputOptions".
1029
 */
1030
export interface OutputOptions {
1031
	/**
1032
	 * Add a comment in the UMD wrapper.
1033
	 */
1034
	auxiliaryComment?:
1035
		| string
1036
		| {
1037
				/**
1038
				 * Set comment for `amd` section in UMD
1039
				 */
1040
				amd?: string;
1041
				/**
1042
				 * Set comment for `commonjs` (exports) section in UMD
1043
				 */
1044
				commonjs?: string;
1045
				/**
1046
				 * Set comment for `commonjs2` (module.exports) section in UMD
1047
				 */
1048
				commonjs2?: string;
1049
				/**
1050
				 * Set comment for `root` (global variable) section in UMD
1051
				 */
1052
				root?: string;
1053
		  };
1054
	/**
1055
	 * The callback function name used by webpack for loading of chunks in WebWorkers.
1056
	 */
1057
	chunkCallbackName?: string;
1058
	/**
1059
	 * The filename of non-entry chunks as relative path inside the `output.path` directory.
1060
	 */
1061
	chunkFilename?: string;
1062
	/**
1063
	 * Number of milliseconds before chunk request expires
1064
	 */
1065
	chunkLoadTimeout?: number;
1066
	/**
1067
	 * This option enables cross-origin loading of chunks.
1068
	 */
1069
	crossOriginLoading?: false | "anonymous" | "use-credentials";
1070
	/**
1071
	 * Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
1072
	 */
1073
	devtoolFallbackModuleFilenameTemplate?: string | Function;
1074
	/**
1075
	 * Enable line to line mapped mode for all/specified modules. Line to line mapped mode uses a simple SourceMap where each line of the generated source is mapped to the same line of the original source. It’s a performance optimization. Only use it if your performance need to be better and you are sure that input lines match which generated lines.
1076
	 */
1077
	devtoolLineToLine?:
1078
		| boolean
1079
		| {
1080
				[k: string]: any;
1081
		  };
1082
	/**
1083
	 * Filename template string of function for the sources array in a generated SourceMap.
1084
	 */
1085
	devtoolModuleFilenameTemplate?: string | Function;
1086
	/**
1087
	 * Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.
1088
	 */
1089
	devtoolNamespace?: string;
1090
	/**
1091
	 * Specifies the name of each output file on disk. You must **not** specify an absolute path here! The `output.path` option determines the location on disk the files are written to, filename is used solely for naming the individual files.
1092
	 */
1093
	filename?: string | Function;
1094
	/**
1095
	 * Use the future version of asset emitting logic, which allows freeing memory of assets after emitting. It could break plugins which assume that assets are still readable after emitting. Will be the new default in the next major version.
1096
	 */
1097
	futureEmitAssets?: boolean;
1098
	/**
1099
	 * An expression which is used to address the global object/scope in runtime code
1100
	 */
1101
	globalObject?: string;
1102
	/**
1103
	 * Digest type used for the hash
1104
	 */
1105
	hashDigest?: string;
1106
	/**
1107
	 * Number of chars which are used for the hash
1108
	 */
1109
	hashDigestLength?: number;
1110
	/**
1111
	 * Algorithm used for generation the hash (see node.js crypto package)
1112
	 */
1113
	hashFunction?: string | import("../lib/util/createHash").HashConstructor;
1114
	/**
1115
	 * Any string which is added to the hash to salt it
1116
	 */
1117
	hashSalt?: string;
1118
	/**
1119
	 * The filename of the Hot Update Chunks. They are inside the output.path directory.
1120
	 */
1121
	hotUpdateChunkFilename?: string;
1122
	/**
1123
	 * The JSONP function used by webpack for async loading of hot update chunks.
1124
	 */
1125
	hotUpdateFunction?: string;
1126
	/**
1127
	 * The filename of the Hot Update Main File. It is inside the `output.path` directory.
1128
	 */
1129
	hotUpdateMainFilename?: string | Function;
1130
	/**
1131
	 * The JSONP function used by webpack for async loading of chunks.
1132
	 */
1133
	jsonpFunction?: string;
1134
	/**
1135
	 * This option enables loading async chunks via a custom script type, such as script type="module"
1136
	 */
1137
	jsonpScriptType?: false | "text/javascript" | "module";
1138
	/**
1139
	 * If set, export the bundle as library. `output.library` is the name.
1140
	 */
1141
	library?: string | string[] | LibraryCustomUmdObject;
1142
	/**
1143
	 * Specify which export should be exposed as library
1144
	 */
1145
	libraryExport?: string | ArrayOfStringValues;
1146
	/**
1147
	 * Type of library
1148
	 */
1149
	libraryTarget?:
1150
		| "var"
1151
		| "assign"
1152
		| "this"
1153
		| "window"
1154
		| "self"
1155
		| "global"
1156
		| "commonjs"
1157
		| "commonjs2"
1158
		| "commonjs-module"
1159
		| "amd"
1160
		| "amd-require"
1161
		| "umd"
1162
		| "umd2"
1163
		| "jsonp"
1164
		| "system";
1165
	/**
1166
	 * The output directory as **absolute path** (required).
1167
	 */
1168
	path?: string;
1169
	/**
1170
	 * Include comments with information about the modules.
1171
	 */
1172
	pathinfo?: boolean;
1173
	/**
1174
	 * The `publicPath` specifies the public URL address of the output files when referenced in a browser.
1175
	 */
1176
	publicPath?: string | Function;
1177
	/**
1178
	 * The filename of the SourceMaps for the JavaScript files. They are inside the `output.path` directory.
1179
	 */
1180
	sourceMapFilename?: string;
1181
	/**
1182
	 * Prefixes every line of the source in the bundle with this string.
1183
	 */
1184
	sourcePrefix?: string;
1185
	/**
1186
	 * Handles exceptions in module loading correctly at a performance cost.
1187
	 */
1188
	strictModuleExceptionHandling?: boolean;
1189
	/**
1190
	 * If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.
1191
	 */
1192
	umdNamedDefine?: boolean;
1193
	/**
1194
	 * The filename of WebAssembly modules as relative path inside the `output.path` directory.
1195
	 */
1196
	webassemblyModuleFilename?: string;
1197
}
1198
/**
1199
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
1200
 * via the `definition` "LibraryCustomUmdObject".
1201
 */
1202
export interface LibraryCustomUmdObject {
1203
	/**
1204
	 * Name of the exposed AMD library in the UMD
1205
	 */
1206
	amd?: string;
1207
	/**
1208
	 * Name of the exposed commonjs export in the UMD
1209
	 */
1210
	commonjs?: string;
1211
	/**
1212
	 * Name of the property exposed globally by a UMD library
1213
	 */
1214
	root?: string | ArrayOfStringValues;
1215
}
1216
/**
1217
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
1218
 * via the `definition` "PerformanceOptions".
1219
 */
1220
export interface PerformanceOptions {
1221
	/**
1222
	 * Filter function to select assets that are checked
1223
	 */
1224
	assetFilter?: Function;
1225
	/**
1226
	 * Sets the format of the hints: warnings, errors or nothing at all
1227
	 */
1228
	hints?: false | "warning" | "error";
1229
	/**
1230
	 * Filesize limit (in bytes) when exceeded, that webpack will provide performance hints
1231
	 */
1232
	maxAssetSize?: number;
1233
	/**
1234
	 * Total size of an entry point (in bytes)
1235
	 */
1236
	maxEntrypointSize?: number;
1237
}
1238
/**
1239
 * This interface was referenced by `WebpackOptions`'s JSON-Schema
1240
 * via the `definition` "StatsOptions".
1241
 */
1242
export interface StatsOptions {
1243
	/**
1244
	 * fallback value for stats options when an option is not defined (has precedence over local webpack defaults)
1245
	 */
1246
	all?: boolean;
1247
	/**
1248
	 * add assets information
1249
	 */
1250
	assets?: boolean;
1251
	/**
1252
	 * sort the assets by that field
1253
	 */
1254
	assetsSort?: string;
1255
	/**
1256
	 * add built at time information
1257
	 */
1258
	builtAt?: boolean;
1259
	/**
1260
	 * add also information about cached (not built) modules
1261
	 */
1262
	cached?: boolean;
1263
	/**
1264
	 * Show cached assets (setting this to `false` only shows emitted files)
1265
	 */
1266
	cachedAssets?: boolean;
1267
	/**
1268
	 * add children information
1269
	 */
1270
	children?: boolean;
1271
	/**
1272
	 * Display all chunk groups with the corresponding bundles
1273
	 */
1274
	chunkGroups?: boolean;
1275
	/**
1276
	 * add built modules information to chunk information
1277
	 */
1278
	chunkModules?: boolean;
1279
	/**
1280
	 * add the origins of chunks and chunk merging info
1281
	 */
1282
	chunkOrigins?: boolean;
1283
	/**
1284
	 * add chunk information
1285
	 */
1286
	chunks?: boolean;
1287
	/**
1288
	 * sort the chunks by that field
1289
	 */
1290
	chunksSort?: string;
1291
	/**
1292
	 * Enables/Disables colorful output
1293
	 */
1294
	colors?:
1295
		| boolean
1296
		| {
1297
				/**
1298
				 * Custom color for bold text
1299
				 */
1300
				bold?: string;
1301
				/**
1302
				 * Custom color for cyan text
1303
				 */
1304
				cyan?: string;
1305
				/**
1306
				 * Custom color for green text
1307
				 */
1308
				green?: string;
1309
				/**
1310
				 * Custom color for magenta text
1311
				 */
1312
				magenta?: string;
1313
				/**
1314
				 * Custom color for red text
1315
				 */
1316
				red?: string;
1317
				/**
1318
				 * Custom color for yellow text
1319
				 */
1320
				yellow?: string;
1321
		  };
1322
	/**
1323
	 * context directory for request shortening
1324
	 */
1325
	context?: string;
1326
	/**
1327
	 * add module depth in module graph
1328
	 */
1329
	depth?: boolean;
1330
	/**
1331
	 * Display the entry points with the corresponding bundles
1332
	 */
1333
	entrypoints?: boolean;
1334
	/**
1335
	 * add --env information
1336
	 */
1337
	env?: boolean;
1338
	/**
1339
	 * add details to errors (like resolving log)
1340
	 */
1341
	errorDetails?: boolean;
1342
	/**
1343
	 * add errors
1344
	 */
1345
	errors?: boolean;
1346
	/**
1347
	 * Please use excludeModules instead.
1348
	 */
1349
	exclude?: FilterTypes | boolean;
1350
	/**
1351
	 * Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions
1352
	 */
1353
	excludeAssets?: FilterTypes;
1354
	/**
1355
	 * Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions
1356
	 */
1357
	excludeModules?: FilterTypes | boolean;
1358
	/**
1359
	 * add the hash of the compilation
1360
	 */
1361
	hash?: boolean;
1362
	/**
1363
	 * add logging output
1364
	 */
1365
	logging?: boolean | ("none" | "error" | "warn" | "info" | "log" | "verbose");
1366
	/**
1367
	 * Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions
1368
	 */
1369
	loggingDebug?: FilterTypes | boolean;
1370
	/**
1371
	 * add stack traces to logging output
1372
	 */
1373
	loggingTrace?: boolean;
1374
	/**
1375
	 * Set the maximum number of modules to be shown
1376
	 */
1377
	maxModules?: number;
1378
	/**
1379
	 * add information about assets inside modules
1380
	 */
1381
	moduleAssets?: boolean;
1382
	/**
1383
	 * add dependencies and origin of warnings/errors
1384
	 */
1385
	moduleTrace?: boolean;
1386
	/**
1387
	 * add built modules information
1388
	 */
1389
	modules?: boolean;
1390
	/**
1391
	 * sort the modules by that field
1392
	 */
1393
	modulesSort?: string;
1394
	/**
1395
	 * add information about modules nested in other modules (like with module concatenation)
1396
	 */
1397
	nestedModules?: boolean;
1398
	/**
1399
	 * show reasons why optimization bailed out for modules
1400
	 */
1401
	optimizationBailout?: boolean;
1402
	/**
1403
	 * Add output path information
1404
	 */
1405
	outputPath?: boolean;
1406
	/**
1407
	 * add performance hint flags
1408
	 */
1409
	performance?: boolean;
1410
	/**
1411
	 * show exports provided by modules
1412
	 */
1413
	providedExports?: boolean;
1414
	/**
1415
	 * Add public path information
1416
	 */
1417
	publicPath?: boolean;
1418
	/**
1419
	 * add information about the reasons why modules are included
1420
	 */
1421
	reasons?: boolean;
1422
	/**
1423
	 * add the source code of modules
1424
	 */
1425
	source?: boolean;
1426
	/**
1427
	 * add timing information
1428
	 */
1429
	timings?: boolean;
1430
	/**
1431
	 * show exports used by modules
1432
	 */
1433
	usedExports?: boolean;
1434
	/**
1435
	 * add webpack version information
1436
	 */
1437
	version?: boolean;
1438
	/**
1439
	 * add warnings
1440
	 */
1441
	warnings?: boolean;
1442
	/**
1443
	 * Suppress warnings that match the specified filters. Filters can be Strings, RegExps or Functions
1444
	 */
1445
	warningsFilter?: FilterTypes;
1446
}