1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export type Entry = EntryDynamic | EntryStatic;
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | export type EntryDynamic = () => EntryStatic | Promise<EntryStatic>;
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | export type EntryStatic = EntryObject | EntryItem;
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 | export type NonEmptyArrayOfUniqueStringValues = string[];
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | export type EntryItem = string | NonEmptyArrayOfUniqueStringValues;
|
36 |
|
37 |
|
38 |
|
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 |
|
57 |
|
58 |
|
59 | export type ExternalItem =
|
60 | | string
|
61 | | {
|
62 | |
63 |
|
64 |
|
65 | [k: string]:
|
66 | | string
|
67 | | {
|
68 | [k: string]: any;
|
69 | }
|
70 | | ArrayOfStringValues
|
71 | | boolean;
|
72 | }
|
73 | | RegExp;
|
74 |
|
75 |
|
76 |
|
77 |
|
78 | export type ArrayOfStringValues = string[];
|
79 |
|
80 |
|
81 |
|
82 |
|
83 | export type FilterTypes = FilterItemTypes | FilterItemTypes[];
|
84 |
|
85 |
|
86 |
|
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 = RuleSetConditionsRecursive;
|
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 = RuleSetConditionsAbsoluteRecursive;
|
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 |
|
246 |
|
247 |
|
248 | export type RuleSetRules = RuleSetRule[];
|
249 |
|
250 | export interface WebpackOptions {
|
251 | |
252 |
|
253 |
|
254 | amd?:
|
255 | | false
|
256 | | {
|
257 | [k: string]: any;
|
258 | };
|
259 | |
260 |
|
261 |
|
262 | bail?: boolean;
|
263 | |
264 |
|
265 |
|
266 | cache?:
|
267 | | boolean
|
268 | | {
|
269 | [k: string]: any;
|
270 | };
|
271 | |
272 |
|
273 |
|
274 | context?: string;
|
275 | |
276 |
|
277 |
|
278 | dependencies?: string[];
|
279 | |
280 |
|
281 |
|
282 | devServer?: {
|
283 | [k: string]: any;
|
284 | };
|
285 | |
286 |
|
287 |
|
288 | devtool?: string | false;
|
289 | |
290 |
|
291 |
|
292 | entry?: Entry;
|
293 | |
294 |
|
295 |
|
296 | externals?: Externals;
|
297 | |
298 |
|
299 |
|
300 | infrastructureLogging?: {
|
301 | |
302 |
|
303 |
|
304 | debug?: FilterTypes | boolean;
|
305 | |
306 |
|
307 |
|
308 | level?: "none" | "error" | "warn" | "info" | "log" | "verbose";
|
309 | };
|
310 | |
311 |
|
312 |
|
313 | loader?: {
|
314 | [k: string]: any;
|
315 | };
|
316 | |
317 |
|
318 |
|
319 | mode?: "development" | "production" | "none";
|
320 | |
321 |
|
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 |
|
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 |
|
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 |
|
744 |
|
745 |
|
746 | export interface NodeOptions {
|
747 | |
748 |
|
749 |
|
750 | Buffer?: false | true | "mock";
|
751 | |
752 |
|
753 |
|
754 | __dirname?: false | true | "mock";
|
755 | |
756 |
|
757 |
|
758 | __filename?: false | true | "mock";
|
759 | |
760 |
|
761 |
|
762 | console?: false | true | "mock";
|
763 | |
764 |
|
765 |
|
766 | global?: boolean;
|
767 | |
768 |
|
769 |
|
770 | process?: false | true | "mock";
|
771 | |
772 |
|
773 |
|
774 | [k: string]: false | true | "mock" | "empty";
|
775 | }
|
776 |
|
777 |
|
778 |
|
779 |
|
780 |
|
781 |
|
782 | export interface OptimizationOptions {
|
783 | |
784 |
|
785 |
|
786 | checkWasmTypes?: boolean;
|
787 | |
788 |
|
789 |
|
790 | chunkIds?: "natural" | "named" | "size" | "total-size" | false;
|
791 | |
792 |
|
793 |
|
794 | concatenateModules?: boolean;
|
795 | |
796 |
|
797 |
|
798 | flagIncludedChunks?: boolean;
|
799 | |
800 |
|
801 |
|
802 | hashedModuleIds?: boolean;
|
803 | |
804 |
|
805 |
|
806 | mangleWasmImports?: boolean;
|
807 | |
808 |
|
809 |
|
810 | mergeDuplicateChunks?: boolean;
|
811 | |
812 |
|
813 |
|
814 | minimize?: boolean;
|
815 | |
816 |
|
817 |
|
818 | minimizer?: (WebpackPluginInstance | WebpackPluginFunction)[];
|
819 | |
820 |
|
821 |
|
822 | moduleIds?: "natural" | "named" | "hashed" | "size" | "total-size" | false;
|
823 | |
824 |
|
825 |
|
826 | namedChunks?: boolean;
|
827 | |
828 |
|
829 |
|
830 | namedModules?: boolean;
|
831 | |
832 |
|
833 |
|
834 | noEmitOnErrors?: boolean;
|
835 | |
836 |
|
837 |
|
838 | nodeEnv?: false | string;
|
839 | |
840 |
|
841 |
|
842 | occurrenceOrder?: boolean;
|
843 | |
844 |
|
845 |
|
846 | portableRecords?: boolean;
|
847 | |
848 |
|
849 |
|
850 | providedExports?: boolean;
|
851 | |
852 |
|
853 |
|
854 | removeAvailableModules?: boolean;
|
855 | |
856 |
|
857 |
|
858 | removeEmptyChunks?: boolean;
|
859 | |
860 |
|
861 |
|
862 | runtimeChunk?:
|
863 | | boolean
|
864 | | ("single" | "multiple")
|
865 | | {
|
866 | |
867 |
|
868 |
|
869 | name?: string | Function;
|
870 | };
|
871 | |
872 |
|
873 |
|
874 | sideEffects?: boolean;
|
875 | |
876 |
|
877 |
|
878 | splitChunks?: false | OptimizationSplitChunksOptions;
|
879 | |
880 |
|
881 |
|
882 | usedExports?: boolean;
|
883 | }
|
884 |
|
885 |
|
886 |
|
887 |
|
888 | export interface OptimizationSplitChunksOptions {
|
889 | |
890 |
|
891 |
|
892 | automaticNameDelimiter?: string;
|
893 | |
894 |
|
895 |
|
896 | automaticNameMaxLength?: number;
|
897 | |
898 |
|
899 |
|
900 | cacheGroups?: {
|
901 | |
902 |
|
903 |
|
904 | [k: string]:
|
905 | | false
|
906 | | Function
|
907 | | string
|
908 | | RegExp
|
909 | | {
|
910 | |
911 |
|
912 |
|
913 | automaticNameDelimiter?: string;
|
914 | |
915 |
|
916 |
|
917 | automaticNameMaxLength?: number;
|
918 | |
919 |
|
920 |
|
921 | automaticNamePrefix?: string;
|
922 | |
923 |
|
924 |
|
925 | chunks?: ("initial" | "async" | "all") | Function;
|
926 | |
927 |
|
928 |
|
929 | enforce?: boolean;
|
930 | |
931 |
|
932 |
|
933 | filename?: string;
|
934 | |
935 |
|
936 |
|
937 | maxAsyncRequests?: number;
|
938 | |
939 |
|
940 |
|
941 | maxInitialRequests?: number;
|
942 | |
943 |
|
944 |
|
945 | maxSize?: number;
|
946 | |
947 |
|
948 |
|
949 | minChunks?: number;
|
950 | |
951 |
|
952 |
|
953 | minSize?: number;
|
954 | |
955 |
|
956 |
|
957 | name?: boolean | Function | string;
|
958 | |
959 |
|
960 |
|
961 | priority?: number;
|
962 | |
963 |
|
964 |
|
965 | reuseExistingChunk?: boolean;
|
966 | |
967 |
|
968 |
|
969 | test?: Function | string | RegExp;
|
970 | };
|
971 | };
|
972 | |
973 |
|
974 |
|
975 | chunks?: ("initial" | "async" | "all") | Function;
|
976 | |
977 |
|
978 |
|
979 | fallbackCacheGroup?: {
|
980 | |
981 |
|
982 |
|
983 | automaticNameDelimiter?: string;
|
984 | |
985 |
|
986 |
|
987 | maxSize?: number;
|
988 | |
989 |
|
990 |
|
991 | minSize?: number;
|
992 | };
|
993 | |
994 |
|
995 |
|
996 | filename?: string;
|
997 | |
998 |
|
999 |
|
1000 | hidePathInfo?: boolean;
|
1001 | |
1002 |
|
1003 |
|
1004 | maxAsyncRequests?: number;
|
1005 | |
1006 |
|
1007 |
|
1008 | maxInitialRequests?: number;
|
1009 | |
1010 |
|
1011 |
|
1012 | maxSize?: number;
|
1013 | |
1014 |
|
1015 |
|
1016 | minChunks?: number;
|
1017 | |
1018 |
|
1019 |
|
1020 | minSize?: number;
|
1021 | |
1022 |
|
1023 |
|
1024 | name?: boolean | Function | string;
|
1025 | }
|
1026 |
|
1027 |
|
1028 |
|
1029 |
|
1030 | export interface OutputOptions {
|
1031 | |
1032 |
|
1033 |
|
1034 | auxiliaryComment?:
|
1035 | | string
|
1036 | | {
|
1037 | |
1038 |
|
1039 |
|
1040 | amd?: string;
|
1041 | |
1042 |
|
1043 |
|
1044 | commonjs?: string;
|
1045 | |
1046 |
|
1047 |
|
1048 | commonjs2?: string;
|
1049 | |
1050 |
|
1051 |
|
1052 | root?: string;
|
1053 | };
|
1054 | |
1055 |
|
1056 |
|
1057 | chunkCallbackName?: string;
|
1058 | |
1059 |
|
1060 |
|
1061 | chunkFilename?: string;
|
1062 | |
1063 |
|
1064 |
|
1065 | chunkLoadTimeout?: number;
|
1066 | |
1067 |
|
1068 |
|
1069 | crossOriginLoading?: false | "anonymous" | "use-credentials";
|
1070 | |
1071 |
|
1072 |
|
1073 | devtoolFallbackModuleFilenameTemplate?: string | Function;
|
1074 | |
1075 |
|
1076 |
|
1077 | devtoolLineToLine?:
|
1078 | | boolean
|
1079 | | {
|
1080 | [k: string]: any;
|
1081 | };
|
1082 | |
1083 |
|
1084 |
|
1085 | devtoolModuleFilenameTemplate?: string | Function;
|
1086 | |
1087 |
|
1088 |
|
1089 | devtoolNamespace?: string;
|
1090 | |
1091 |
|
1092 |
|
1093 | filename?: string | Function;
|
1094 | |
1095 |
|
1096 |
|
1097 | futureEmitAssets?: boolean;
|
1098 | |
1099 |
|
1100 |
|
1101 | globalObject?: string;
|
1102 | |
1103 |
|
1104 |
|
1105 | hashDigest?: string;
|
1106 | |
1107 |
|
1108 |
|
1109 | hashDigestLength?: number;
|
1110 | |
1111 |
|
1112 |
|
1113 | hashFunction?: string | import("../lib/util/createHash").HashConstructor;
|
1114 | |
1115 |
|
1116 |
|
1117 | hashSalt?: string;
|
1118 | |
1119 |
|
1120 |
|
1121 | hotUpdateChunkFilename?: string | Function;
|
1122 | |
1123 |
|
1124 |
|
1125 | hotUpdateFunction?: string;
|
1126 | |
1127 |
|
1128 |
|
1129 | hotUpdateMainFilename?: string | Function;
|
1130 | |
1131 |
|
1132 |
|
1133 | jsonpFunction?: string;
|
1134 | |
1135 |
|
1136 |
|
1137 | jsonpScriptType?: false | "text/javascript" | "module";
|
1138 | |
1139 |
|
1140 |
|
1141 | library?: string | string[] | LibraryCustomUmdObject;
|
1142 | |
1143 |
|
1144 |
|
1145 | libraryExport?: string | ArrayOfStringValues;
|
1146 | |
1147 |
|
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 |
|
1167 |
|
1168 | path?: string;
|
1169 | |
1170 |
|
1171 |
|
1172 | pathinfo?: boolean;
|
1173 | |
1174 |
|
1175 |
|
1176 | publicPath?: string | Function;
|
1177 | |
1178 |
|
1179 |
|
1180 | sourceMapFilename?: string;
|
1181 | |
1182 |
|
1183 |
|
1184 | sourcePrefix?: string;
|
1185 | |
1186 |
|
1187 |
|
1188 | strictModuleExceptionHandling?: boolean;
|
1189 | |
1190 |
|
1191 |
|
1192 | umdNamedDefine?: boolean;
|
1193 | |
1194 |
|
1195 |
|
1196 | webassemblyModuleFilename?: string;
|
1197 | }
|
1198 |
|
1199 |
|
1200 |
|
1201 |
|
1202 | export interface LibraryCustomUmdObject {
|
1203 | |
1204 |
|
1205 |
|
1206 | amd?: string;
|
1207 | |
1208 |
|
1209 |
|
1210 | commonjs?: string;
|
1211 | |
1212 |
|
1213 |
|
1214 | root?: string | ArrayOfStringValues;
|
1215 | }
|
1216 |
|
1217 |
|
1218 |
|
1219 |
|
1220 | export interface PerformanceOptions {
|
1221 | |
1222 |
|
1223 |
|
1224 | assetFilter?: Function;
|
1225 | |
1226 |
|
1227 |
|
1228 | hints?: false | "warning" | "error";
|
1229 | |
1230 |
|
1231 |
|
1232 | maxAssetSize?: number;
|
1233 | |
1234 |
|
1235 |
|
1236 | maxEntrypointSize?: number;
|
1237 | }
|
1238 |
|
1239 |
|
1240 |
|
1241 |
|
1242 | export interface StatsOptions {
|
1243 | |
1244 |
|
1245 |
|
1246 | all?: boolean;
|
1247 | |
1248 |
|
1249 |
|
1250 | assets?: boolean;
|
1251 | |
1252 |
|
1253 |
|
1254 | assetsSort?: string;
|
1255 | |
1256 |
|
1257 |
|
1258 | builtAt?: boolean;
|
1259 | |
1260 |
|
1261 |
|
1262 | cached?: boolean;
|
1263 | |
1264 |
|
1265 |
|
1266 | cachedAssets?: boolean;
|
1267 | |
1268 |
|
1269 |
|
1270 | children?: boolean;
|
1271 | |
1272 |
|
1273 |
|
1274 | chunkGroups?: boolean;
|
1275 | |
1276 |
|
1277 |
|
1278 | chunkModules?: boolean;
|
1279 | |
1280 |
|
1281 |
|
1282 | chunkOrigins?: boolean;
|
1283 | |
1284 |
|
1285 |
|
1286 | chunks?: boolean;
|
1287 | |
1288 |
|
1289 |
|
1290 | chunksSort?: string;
|
1291 | |
1292 |
|
1293 |
|
1294 | colors?:
|
1295 | | boolean
|
1296 | | {
|
1297 | |
1298 |
|
1299 |
|
1300 | bold?: string;
|
1301 | |
1302 |
|
1303 |
|
1304 | cyan?: string;
|
1305 | |
1306 |
|
1307 |
|
1308 | green?: string;
|
1309 | |
1310 |
|
1311 |
|
1312 | magenta?: string;
|
1313 | |
1314 |
|
1315 |
|
1316 | red?: string;
|
1317 | |
1318 |
|
1319 |
|
1320 | yellow?: string;
|
1321 | };
|
1322 | |
1323 |
|
1324 |
|
1325 | context?: string;
|
1326 | |
1327 |
|
1328 |
|
1329 | depth?: boolean;
|
1330 | |
1331 |
|
1332 |
|
1333 | entrypoints?: boolean;
|
1334 | |
1335 |
|
1336 |
|
1337 | env?: boolean;
|
1338 | |
1339 |
|
1340 |
|
1341 | errorDetails?: boolean;
|
1342 | |
1343 |
|
1344 |
|
1345 | errors?: boolean;
|
1346 | |
1347 |
|
1348 |
|
1349 | exclude?: FilterTypes | boolean;
|
1350 | |
1351 |
|
1352 |
|
1353 | excludeAssets?: FilterTypes;
|
1354 | |
1355 |
|
1356 |
|
1357 | excludeModules?: FilterTypes | boolean;
|
1358 | |
1359 |
|
1360 |
|
1361 | hash?: boolean;
|
1362 | |
1363 |
|
1364 |
|
1365 | logging?: boolean | ("none" | "error" | "warn" | "info" | "log" | "verbose");
|
1366 | |
1367 |
|
1368 |
|
1369 | loggingDebug?: FilterTypes | boolean;
|
1370 | |
1371 |
|
1372 |
|
1373 | loggingTrace?: boolean;
|
1374 | |
1375 |
|
1376 |
|
1377 | maxModules?: number;
|
1378 | |
1379 |
|
1380 |
|
1381 | moduleAssets?: boolean;
|
1382 | |
1383 |
|
1384 |
|
1385 | moduleTrace?: boolean;
|
1386 | |
1387 |
|
1388 |
|
1389 | modules?: boolean;
|
1390 | |
1391 |
|
1392 |
|
1393 | modulesSort?: string;
|
1394 | |
1395 |
|
1396 |
|
1397 | nestedModules?: boolean;
|
1398 | |
1399 |
|
1400 |
|
1401 | optimizationBailout?: boolean;
|
1402 | |
1403 |
|
1404 |
|
1405 | outputPath?: boolean;
|
1406 | |
1407 |
|
1408 |
|
1409 | performance?: boolean;
|
1410 | |
1411 |
|
1412 |
|
1413 | providedExports?: boolean;
|
1414 | |
1415 |
|
1416 |
|
1417 | publicPath?: boolean;
|
1418 | |
1419 |
|
1420 |
|
1421 | reasons?: boolean;
|
1422 | |
1423 |
|
1424 |
|
1425 | source?: boolean;
|
1426 | |
1427 |
|
1428 |
|
1429 | timings?: boolean;
|
1430 | |
1431 |
|
1432 |
|
1433 | usedExports?: boolean;
|
1434 | |
1435 |
|
1436 |
|
1437 | version?: boolean;
|
1438 | |
1439 |
|
1440 |
|
1441 | warnings?: boolean;
|
1442 | |
1443 |
|
1444 |
|
1445 | warningsFilter?: FilterTypes;
|
1446 | }
|