UNPKG

295 kBTypeScriptView Raw
1/*
2 * This file was automatically generated.
3 * DO NOT MODIFY BY HAND.
4 * Run `yarn special-lint-fix` to update
5 */
6
7import {
8 ArrayExpression,
9 ArrayPattern,
10 ArrowFunctionExpression,
11 AssignmentExpression,
12 AssignmentPattern,
13 AssignmentProperty,
14 AwaitExpression,
15 BinaryExpression,
16 BlockStatement,
17 BreakStatement,
18 CatchClause,
19 ChainExpression,
20 ClassBody,
21 ClassDeclaration,
22 ClassExpression,
23 Comment,
24 ConditionalExpression,
25 ContinueStatement,
26 DebuggerStatement,
27 DoWhileStatement,
28 EmptyStatement,
29 ExportAllDeclaration,
30 ExportDefaultDeclaration,
31 ExportNamedDeclaration,
32 ExportSpecifier,
33 ExpressionStatement,
34 ForInStatement,
35 ForOfStatement,
36 ForStatement,
37 FunctionDeclaration,
38 FunctionExpression,
39 Identifier,
40 IfStatement,
41 ImportDeclaration,
42 ImportDefaultSpecifier,
43 ImportExpression,
44 ImportNamespaceSpecifier,
45 ImportSpecifier,
46 LabeledStatement,
47 LogicalExpression,
48 MemberExpression,
49 MetaProperty,
50 MethodDefinition,
51 NewExpression,
52 ObjectExpression,
53 ObjectPattern,
54 Program,
55 Property,
56 RegExpLiteral,
57 RestElement,
58 ReturnStatement,
59 SequenceExpression,
60 SimpleCallExpression,
61 SimpleLiteral,
62 SpreadElement,
63 Super,
64 SwitchCase,
65 SwitchStatement,
66 TaggedTemplateExpression,
67 TemplateElement,
68 TemplateLiteral,
69 ThisExpression,
70 ThrowStatement,
71 TryStatement,
72 UnaryExpression,
73 UpdateExpression,
74 VariableDeclaration,
75 VariableDeclarator,
76 WhileStatement,
77 WithStatement,
78 YieldExpression
79} from "estree";
80import { JSONSchema4, JSONSchema6, JSONSchema7 } from "json-schema";
81import { default as ValidationError } from "schema-utils/declarations/ValidationError";
82import {
83 Extend,
84 ValidationErrorConfiguration
85} from "schema-utils/declarations/validate";
86import {
87 AsArray,
88 AsyncParallelHook,
89 AsyncSeriesBailHook,
90 AsyncSeriesHook,
91 AsyncSeriesWaterfallHook,
92 HookMap,
93 MultiHook,
94 SyncBailHook,
95 SyncHook,
96 SyncWaterfallHook
97} from "tapable";
98
99declare class AbstractLibraryPlugin<T> {
100 constructor(__0: {
101 /**
102 * name of the plugin
103 */
104 pluginName: string;
105 /**
106 * used library type
107 */
108 type: string;
109 });
110
111 /**
112 * Apply the plugin
113 */
114 apply(compiler: Compiler): void;
115 parseOptions(library: LibraryOptions): false | T;
116 finishEntryModule(
117 module: Module,
118 entryName: string,
119 libraryContext: LibraryContext<T>
120 ): void;
121 embedInRuntimeBailout(
122 module: Module,
123 renderContext: RenderContextObject,
124 libraryContext: LibraryContext<T>
125 ): undefined | string;
126 runtimeRequirements(
127 chunk: Chunk,
128 set: Set<string>,
129 libraryContext: LibraryContext<T>
130 ): void;
131 render(
132 source: Source,
133 renderContext: RenderContextObject,
134 libraryContext: LibraryContext<T>
135 ): Source;
136 renderStartup(
137 source: Source,
138 module: Module,
139 renderContext: StartupRenderContext,
140 libraryContext: LibraryContext<T>
141 ): Source;
142 chunkHash(
143 chunk: Chunk,
144 hash: Hash,
145 chunkHashContext: ChunkHashContext,
146 libraryContext: LibraryContext<T>
147 ): void;
148 static COMMON_LIBRARY_NAME_MESSAGE: string;
149}
150declare class AggressiveMergingPlugin {
151 constructor(options?: any);
152 options: any;
153
154 /**
155 * Apply the plugin
156 */
157 apply(compiler: Compiler): void;
158}
159declare class AggressiveSplittingPlugin {
160 constructor(options?: AggressiveSplittingPluginOptions);
161 options: AggressiveSplittingPluginOptions;
162
163 /**
164 * Apply the plugin
165 */
166 apply(compiler: Compiler): void;
167 static wasChunkRecorded(chunk: Chunk): boolean;
168}
169declare interface AggressiveSplittingPluginOptions {
170 /**
171 * Extra cost for each chunk (Default: 9.8kiB).
172 */
173 chunkOverhead?: number;
174
175 /**
176 * Extra cost multiplicator for entry chunks (Default: 10).
177 */
178 entryChunkMultiplicator?: number;
179
180 /**
181 * Byte, max size of per file (Default: 50kiB).
182 */
183 maxSize?: number;
184
185 /**
186 * Byte, split point. (Default: 30kiB).
187 */
188 minSize?: number;
189}
190declare interface AliasOption {
191 alias: string | false | string[];
192 name: string;
193 onlyModule?: boolean;
194}
195type AliasOptionNewRequest = string | false | string[];
196declare interface AliasOptions {
197 [index: string]: AliasOptionNewRequest;
198}
199declare interface Argument {
200 description: string;
201 simpleType: "string" | "number" | "boolean";
202 multiple: boolean;
203 configs: ArgumentConfig[];
204}
205declare interface ArgumentConfig {
206 description: string;
207 path: string;
208 multiple: boolean;
209 type: "string" | "number" | "boolean" | "path" | "enum" | "RegExp" | "reset";
210 values?: any[];
211}
212declare interface Asset {
213 /**
214 * the filename of the asset
215 */
216 name: string;
217
218 /**
219 * source of the asset
220 */
221 source: Source;
222
223 /**
224 * info about the asset
225 */
226 info: AssetInfo;
227}
228declare interface AssetEmittedInfo {
229 content: Buffer;
230 source: Source;
231 compilation: Compilation;
232 outputPath: string;
233 targetPath: string;
234}
235type AssetFilterItemTypes =
236 | string
237 | RegExp
238 | ((name: string, asset: StatsAsset) => boolean);
239
240/**
241 * Options object for data url generation.
242 */
243declare interface AssetGeneratorDataUrlOptions {
244 /**
245 * Asset encoding (defaults to base64).
246 */
247 encoding?: false | "base64";
248
249 /**
250 * Asset mimetype (getting from file extension by default).
251 */
252 mimetype?: string;
253}
254type AssetGeneratorOptions = AssetInlineGeneratorOptions &
255 AssetResourceGeneratorOptions;
256type AssetInfo = KnownAssetInfo & Record<string, any>;
257
258/**
259 * Generator options for asset/inline modules.
260 */
261declare interface AssetInlineGeneratorOptions {
262 /**
263 * The options for data url generator.
264 */
265 dataUrl?:
266 | AssetGeneratorDataUrlOptions
267 | ((
268 source: string | Buffer,
269 context: { filename: string; module: Module }
270 ) => string);
271}
272
273/**
274 * Options object for DataUrl condition.
275 */
276declare interface AssetParserDataUrlOptions {
277 /**
278 * Maximum size of asset that should be inline as modules. Default: 8kb.
279 */
280 maxSize?: number;
281}
282
283/**
284 * Parser options for asset modules.
285 */
286declare interface AssetParserOptions {
287 /**
288 * The condition for inlining the asset as DataUrl.
289 */
290 dataUrlCondition?:
291 | AssetParserDataUrlOptions
292 | ((
293 source: string | Buffer,
294 context: { filename: string; module: Module }
295 ) => boolean);
296}
297
298/**
299 * Generator options for asset/resource modules.
300 */
301declare interface AssetResourceGeneratorOptions {
302 /**
303 * Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR.
304 */
305 emit?: boolean;
306
307 /**
308 * Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
309 */
310 filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
311}
312declare abstract class AsyncDependenciesBlock extends DependenciesBlock {
313 groupOptions: RawChunkGroupOptions & { name?: string } & {
314 entryOptions?: EntryOptions;
315 };
316 loc?: SyntheticDependencyLocation | RealDependencyLocation;
317 request?: string;
318 parent: DependenciesBlock;
319 chunkName: string;
320 module: any;
321}
322declare abstract class AsyncQueue<T, K, R> {
323 hooks: {
324 beforeAdd: AsyncSeriesHook<[T]>;
325 added: SyncHook<[T]>;
326 beforeStart: AsyncSeriesHook<[T]>;
327 started: SyncHook<[T]>;
328 result: SyncHook<[T, Error, R]>;
329 };
330 add(item: T, callback: CallbackFunction<R>): void;
331 invalidate(item: T): void;
332 stop(): void;
333 increaseParallelism(): void;
334 decreaseParallelism(): void;
335 isProcessing(item: T): boolean;
336 isQueued(item: T): boolean;
337 isDone(item: T): boolean;
338}
339declare class AsyncWebAssemblyModulesPlugin {
340 constructor(options?: any);
341 options: any;
342
343 /**
344 * Apply the plugin
345 */
346 apply(compiler: Compiler): void;
347 renderModule(module?: any, renderContext?: any, hooks?: any): any;
348 static getCompilationHooks(
349 compilation: Compilation
350 ): CompilationHooksAsyncWebAssemblyModulesPlugin;
351}
352declare class AutomaticPrefetchPlugin {
353 constructor();
354
355 /**
356 * Apply the plugin
357 */
358 apply(compiler: Compiler): void;
359}
360type AuxiliaryComment = string | LibraryCustomUmdCommentObject;
361declare class BannerPlugin {
362 constructor(options: BannerPluginArgument);
363 options: BannerPluginOptions;
364 banner: (data: { hash: string; chunk: Chunk; filename: string }) => string;
365
366 /**
367 * Apply the plugin
368 */
369 apply(compiler: Compiler): void;
370}
371type BannerPluginArgument =
372 | string
373 | BannerPluginOptions
374 | ((data: { hash: string; chunk: Chunk; filename: string }) => string);
375declare interface BannerPluginOptions {
376 /**
377 * Specifies the banner.
378 */
379 banner:
380 | string
381 | ((data: { hash: string; chunk: Chunk; filename: string }) => string);
382
383 /**
384 * If true, the banner will only be added to the entry chunks.
385 */
386 entryOnly?: boolean;
387
388 /**
389 * Exclude all modules matching any of these conditions.
390 */
391 exclude?: string | RegExp | Rule[];
392
393 /**
394 * Include all modules matching any of these conditions.
395 */
396 include?: string | RegExp | Rule[];
397
398 /**
399 * If true, banner will not be wrapped in a comment.
400 */
401 raw?: boolean;
402
403 /**
404 * Include all modules that pass test assertion.
405 */
406 test?: string | RegExp | Rule[];
407}
408declare interface BaseResolveRequest {
409 path: string | false;
410 descriptionFilePath?: string;
411 descriptionFileRoot?: string;
412 descriptionFileData?: object;
413 relativePath?: string;
414 ignoreSymlinks?: boolean;
415 fullySpecified?: boolean;
416}
417declare abstract class BasicEvaluatedExpression {
418 type: number;
419 range: [number, number];
420 falsy: boolean;
421 truthy: boolean;
422 nullish?: boolean;
423 sideEffects: boolean;
424 bool?: boolean;
425 number?: number;
426 bigint?: bigint;
427 regExp?: RegExp;
428 string?: string;
429 quasis?: BasicEvaluatedExpression[];
430 parts?: BasicEvaluatedExpression[];
431 array?: any[];
432 items?: BasicEvaluatedExpression[];
433 options?: BasicEvaluatedExpression[];
434 prefix?: BasicEvaluatedExpression;
435 postfix?: BasicEvaluatedExpression;
436 wrappedInnerExpressions: any;
437 identifier?: string;
438 rootInfo: VariableInfoInterface;
439 getMembers: () => string[];
440 expression: NodeEstreeIndex;
441 isUnknown(): boolean;
442 isNull(): boolean;
443 isUndefined(): boolean;
444 isString(): boolean;
445 isNumber(): boolean;
446 isBigInt(): boolean;
447 isBoolean(): boolean;
448 isRegExp(): boolean;
449 isConditional(): boolean;
450 isArray(): boolean;
451 isConstArray(): boolean;
452 isIdentifier(): boolean;
453 isWrapped(): boolean;
454 isTemplateString(): boolean;
455
456 /**
457 * Is expression a primitive or an object type value?
458 */
459 isPrimitiveType(): undefined | boolean;
460
461 /**
462 * Is expression a runtime or compile-time value?
463 */
464 isCompileTimeValue(): boolean;
465
466 /**
467 * Gets the compile-time value of the expression
468 */
469 asCompileTimeValue(): any;
470 isTruthy(): boolean;
471 isFalsy(): boolean;
472 isNullish(): undefined | boolean;
473
474 /**
475 * Can this expression have side effects?
476 */
477 couldHaveSideEffects(): boolean;
478 asBool(): any;
479 asNullish(): undefined | boolean;
480 asString(): any;
481 setString(string?: any): BasicEvaluatedExpression;
482 setUndefined(): BasicEvaluatedExpression;
483 setNull(): BasicEvaluatedExpression;
484 setNumber(number?: any): BasicEvaluatedExpression;
485 setBigInt(bigint?: any): BasicEvaluatedExpression;
486 setBoolean(bool?: any): BasicEvaluatedExpression;
487 setRegExp(regExp?: any): BasicEvaluatedExpression;
488 setIdentifier(
489 identifier?: any,
490 rootInfo?: any,
491 getMembers?: any
492 ): BasicEvaluatedExpression;
493 setWrapped(
494 prefix?: any,
495 postfix?: any,
496 innerExpressions?: any
497 ): BasicEvaluatedExpression;
498 setOptions(options?: any): BasicEvaluatedExpression;
499 addOptions(options?: any): BasicEvaluatedExpression;
500 setItems(items?: any): BasicEvaluatedExpression;
501 setArray(array?: any): BasicEvaluatedExpression;
502 setTemplateString(
503 quasis?: any,
504 parts?: any,
505 kind?: any
506 ): BasicEvaluatedExpression;
507 templateStringKind: any;
508 setTruthy(): BasicEvaluatedExpression;
509 setFalsy(): BasicEvaluatedExpression;
510 setNullish(value?: any): BasicEvaluatedExpression;
511 setRange(range?: any): BasicEvaluatedExpression;
512 setSideEffects(sideEffects?: boolean): BasicEvaluatedExpression;
513 setExpression(expression?: any): BasicEvaluatedExpression;
514}
515type BuildMeta = KnownBuildMeta & Record<string, any>;
516declare abstract class ByTypeGenerator extends Generator {
517 map: any;
518}
519declare const CIRCULAR_CONNECTION: unique symbol;
520declare class Cache {
521 constructor();
522 hooks: {
523 get: AsyncSeriesBailHook<
524 [
525 string,
526 null | Etag,
527 ((result: any, callback: (arg0?: Error) => void) => void)[]
528 ],
529 any
530 >;
531 store: AsyncParallelHook<[string, null | Etag, any]>;
532 storeBuildDependencies: AsyncParallelHook<[Iterable<string>]>;
533 beginIdle: SyncHook<[]>;
534 endIdle: AsyncParallelHook<[]>;
535 shutdown: AsyncParallelHook<[]>;
536 };
537 get<T>(
538 identifier: string,
539 etag: null | Etag,
540 callback: CallbackCache<T>
541 ): void;
542 store<T>(
543 identifier: string,
544 etag: null | Etag,
545 data: T,
546 callback: CallbackCache<void>
547 ): void;
548
549 /**
550 * After this method has succeeded the cache can only be restored when build dependencies are
551 */
552 storeBuildDependencies(
553 dependencies: Iterable<string>,
554 callback: CallbackCache<void>
555 ): void;
556 beginIdle(): void;
557 endIdle(callback: CallbackCache<void>): void;
558 shutdown(callback: CallbackCache<void>): void;
559 static STAGE_MEMORY: number;
560 static STAGE_DEFAULT: number;
561 static STAGE_DISK: number;
562 static STAGE_NETWORK: number;
563}
564declare abstract class CacheFacade {
565 getChildCache(name: string): CacheFacade;
566 getItemCache(identifier: string, etag: null | Etag): ItemCacheFacade;
567 getLazyHashedEtag(obj: HashableObject): Etag;
568 mergeEtags(a: Etag, b: Etag): Etag;
569 get<T>(
570 identifier: string,
571 etag: null | Etag,
572 callback: CallbackCache<T>
573 ): void;
574 getPromise<T>(identifier: string, etag: null | Etag): Promise<T>;
575 store<T>(
576 identifier: string,
577 etag: null | Etag,
578 data: T,
579 callback: CallbackCache<void>
580 ): void;
581 storePromise<T>(
582 identifier: string,
583 etag: null | Etag,
584 data: T
585 ): Promise<void>;
586 provide<T>(
587 identifier: string,
588 etag: null | Etag,
589 computer: (arg0: CallbackNormalErrorCache<T>) => void,
590 callback: CallbackNormalErrorCache<T>
591 ): void;
592 providePromise<T>(
593 identifier: string,
594 etag: null | Etag,
595 computer: () => T | Promise<T>
596 ): Promise<T>;
597}
598declare interface CacheGroupSource {
599 key?: string;
600 priority?: number;
601 getName?: (
602 module?: Module,
603 chunks?: Chunk[],
604 key?: string
605 ) => undefined | string;
606 chunksFilter?: (chunk: Chunk) => boolean;
607 enforce?: boolean;
608 minSize: SplitChunksSizes;
609 minRemainingSize: SplitChunksSizes;
610 enforceSizeThreshold: SplitChunksSizes;
611 maxAsyncSize: SplitChunksSizes;
612 maxInitialSize: SplitChunksSizes;
613 minChunks?: number;
614 maxAsyncRequests?: number;
615 maxInitialRequests?: number;
616 filename?: string | ((arg0: PathData, arg1?: AssetInfo) => string);
617 idHint?: string;
618 automaticNameDelimiter: string;
619 reuseExistingChunk?: boolean;
620 usedExports?: boolean;
621}
622declare interface CacheGroupsContext {
623 moduleGraph: ModuleGraph;
624 chunkGraph: ChunkGraph;
625}
626type CacheOptionsNormalized = false | MemoryCacheOptions | FileCacheOptions;
627declare class CachedSource extends Source {
628 constructor(source: Source);
629 constructor(source: Source | (() => Source), cachedData?: any);
630 original(): Source;
631 originalLazy(): Source | (() => Source);
632 getCachedData(): any;
633}
634type CallExpression = SimpleCallExpression | NewExpression;
635declare interface CallExpressionInfo {
636 type: "call";
637 call: CallExpression;
638 calleeName: string;
639 rootInfo: string | VariableInfo;
640 getCalleeMembers: () => string[];
641 name: string;
642 getMembers: () => string[];
643}
644declare interface CallbackCache<T> {
645 (err?: WebpackError, result?: T): void;
646}
647declare interface CallbackFunction<T> {
648 (err?: Error, result?: T): any;
649}
650declare interface CallbackNormalErrorCache<T> {
651 (err?: Error, result?: T): void;
652}
653declare interface CallbackWebpack<T> {
654 (err?: Error, stats?: T): void;
655}
656type Cell<T> = undefined | T;
657declare class Chunk {
658 constructor(name?: string);
659 id: null | string | number;
660 ids: null | (string | number)[];
661 debugId: number;
662 name: string;
663 idNameHints: SortableSet<string>;
664 preventIntegration: boolean;
665 filenameTemplate:
666 | null
667 | string
668 | ((arg0: PathData, arg1?: AssetInfo) => string);
669 runtime: RuntimeSpec;
670 files: Set<string>;
671 auxiliaryFiles: Set<string>;
672 rendered: boolean;
673 hash?: string;
674 contentHash: Record<string, string>;
675 renderedHash?: string;
676 chunkReason?: string;
677 extraAsync: boolean;
678 readonly entryModule?: Module;
679 hasEntryModule(): boolean;
680 addModule(module: Module): boolean;
681 removeModule(module: Module): void;
682 getNumberOfModules(): number;
683 readonly modulesIterable: Iterable<Module>;
684 compareTo(otherChunk: Chunk): 0 | 1 | -1;
685 containsModule(module: Module): boolean;
686 getModules(): Module[];
687 remove(): void;
688 moveModule(module: Module, otherChunk: Chunk): void;
689 integrate(otherChunk: Chunk): boolean;
690 canBeIntegrated(otherChunk: Chunk): boolean;
691 isEmpty(): boolean;
692 modulesSize(): number;
693 size(options?: ChunkSizeOptions): number;
694 integratedSize(otherChunk: Chunk, options: ChunkSizeOptions): number;
695 getChunkModuleMaps(filterFn: (m: Module) => boolean): ChunkModuleMaps;
696 hasModuleInGraph(
697 filterFn: (m: Module) => boolean,
698 filterChunkFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
699 ): boolean;
700 getChunkMaps(realHash: boolean): ChunkMaps;
701 hasRuntime(): boolean;
702 canBeInitial(): boolean;
703 isOnlyInitial(): boolean;
704 getEntryOptions(): undefined | EntryOptions;
705 addGroup(chunkGroup: ChunkGroup): void;
706 removeGroup(chunkGroup: ChunkGroup): void;
707 isInGroup(chunkGroup: ChunkGroup): boolean;
708 getNumberOfGroups(): number;
709 readonly groupsIterable: Iterable<ChunkGroup>;
710 disconnectFromGroups(): void;
711 split(newChunk: Chunk): void;
712 updateHash(hash: Hash, chunkGraph: ChunkGraph): void;
713 getAllAsyncChunks(): Set<Chunk>;
714 getAllInitialChunks(): Set<Chunk>;
715 getAllReferencedChunks(): Set<Chunk>;
716 getAllReferencedAsyncEntrypoints(): Set<Entrypoint>;
717 hasAsyncChunks(): boolean;
718 getChildIdsByOrders(
719 chunkGraph: ChunkGraph,
720 filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
721 ): Record<string, (string | number)[]>;
722 getChildrenOfTypeInOrder(
723 chunkGraph: ChunkGraph,
724 type: string
725 ): { onChunks: Chunk[]; chunks: Set<Chunk> }[];
726 getChildIdsByOrdersMap(
727 chunkGraph: ChunkGraph,
728 includeDirectChildren?: boolean,
729 filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
730 ): Record<string | number, Record<string, (string | number)[]>>;
731}
732declare class ChunkGraph {
733 constructor(moduleGraph: ModuleGraph);
734 moduleGraph: ModuleGraph;
735 connectChunkAndModule(chunk: Chunk, module: Module): void;
736 disconnectChunkAndModule(chunk: Chunk, module: Module): void;
737 disconnectChunk(chunk: Chunk): void;
738 attachModules(chunk: Chunk, modules: Iterable<Module>): void;
739 attachRuntimeModules(chunk: Chunk, modules: Iterable<RuntimeModule>): void;
740 attachFullHashModules(chunk: Chunk, modules: Iterable<RuntimeModule>): void;
741 replaceModule(oldModule: Module, newModule: Module): void;
742 isModuleInChunk(module: Module, chunk: Chunk): boolean;
743 isModuleInChunkGroup(module: Module, chunkGroup: ChunkGroup): boolean;
744 isEntryModule(module: Module): boolean;
745 getModuleChunksIterable(module: Module): Iterable<Chunk>;
746 getOrderedModuleChunksIterable(
747 module: Module,
748 sortFn: (arg0: Chunk, arg1: Chunk) => 0 | 1 | -1
749 ): Iterable<Chunk>;
750 getModuleChunks(module: Module): Chunk[];
751 getNumberOfModuleChunks(module: Module): number;
752 getModuleRuntimes(module: Module): RuntimeSpecSet;
753 getNumberOfChunkModules(chunk: Chunk): number;
754 getChunkModulesIterable(chunk: Chunk): Iterable<Module>;
755 getChunkModulesIterableBySourceType(
756 chunk: Chunk,
757 sourceType: string
758 ): undefined | Iterable<Module>;
759 getOrderedChunkModulesIterable(
760 chunk: Chunk,
761 comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1
762 ): Iterable<Module>;
763 getOrderedChunkModulesIterableBySourceType(
764 chunk: Chunk,
765 sourceType: string,
766 comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1
767 ): undefined | Iterable<Module>;
768 getChunkModules(chunk: Chunk): Module[];
769 getOrderedChunkModules(
770 chunk: Chunk,
771 comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1
772 ): Module[];
773 getChunkModuleIdMap(
774 chunk: Chunk,
775 filterFn: (m: Module) => boolean,
776 includeAllChunks?: boolean
777 ): Record<string | number, (string | number)[]>;
778 getChunkModuleRenderedHashMap(
779 chunk: Chunk,
780 filterFn: (m: Module) => boolean,
781 hashLength?: number,
782 includeAllChunks?: boolean
783 ): Record<string | number, Record<string | number, string>>;
784 getChunkConditionMap(
785 chunk: Chunk,
786 filterFn: (c: Chunk, chunkGraph: ChunkGraph) => boolean
787 ): Record<string | number, boolean>;
788 hasModuleInGraph(
789 chunk: Chunk,
790 filterFn: (m: Module) => boolean,
791 filterChunkFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
792 ): boolean;
793 compareChunks(chunkA: Chunk, chunkB: Chunk): 0 | 1 | -1;
794 getChunkModulesSize(chunk: Chunk): number;
795 getChunkModulesSizes(chunk: Chunk): Record<string, number>;
796 getChunkRootModules(chunk: Chunk): Module[];
797 getChunkSize(chunk: Chunk, options?: ChunkSizeOptions): number;
798 getIntegratedChunksSize(
799 chunkA: Chunk,
800 chunkB: Chunk,
801 options?: ChunkSizeOptions
802 ): number;
803 canChunksBeIntegrated(chunkA: Chunk, chunkB: Chunk): boolean;
804 integrateChunks(chunkA: Chunk, chunkB: Chunk): void;
805 isEntryModuleInChunk(module: Module, chunk: Chunk): boolean;
806 connectChunkAndEntryModule(
807 chunk: Chunk,
808 module: Module,
809 entrypoint?: Entrypoint
810 ): void;
811 connectChunkAndRuntimeModule(chunk: Chunk, module: RuntimeModule): void;
812 addFullHashModuleToChunk(chunk: Chunk, module: RuntimeModule): void;
813 disconnectChunkAndEntryModule(chunk: Chunk, module: Module): void;
814 disconnectChunkAndRuntimeModule(chunk: Chunk, module: RuntimeModule): void;
815 disconnectEntryModule(module: Module): void;
816 disconnectEntries(chunk: Chunk): void;
817 getNumberOfEntryModules(chunk: Chunk): number;
818 getNumberOfRuntimeModules(chunk: Chunk): number;
819 getChunkEntryModulesIterable(chunk: Chunk): Iterable<Module>;
820 getChunkEntryDependentChunksIterable(chunk: Chunk): Iterable<Chunk>;
821 hasChunkEntryDependentChunks(chunk: Chunk): boolean;
822 getChunkRuntimeModulesIterable(chunk: Chunk): Iterable<RuntimeModule>;
823 getChunkRuntimeModulesInOrder(chunk: Chunk): RuntimeModule[];
824 getChunkFullHashModulesIterable(
825 chunk: Chunk
826 ): undefined | Iterable<RuntimeModule>;
827 getChunkFullHashModulesSet(
828 chunk: Chunk
829 ): undefined | ReadonlySet<RuntimeModule>;
830 getChunkEntryModulesWithChunkGroupIterable(
831 chunk: Chunk
832 ): Iterable<[Module, undefined | Entrypoint]>;
833 getBlockChunkGroup(depBlock: AsyncDependenciesBlock): ChunkGroup;
834 connectBlockAndChunkGroup(
835 depBlock: AsyncDependenciesBlock,
836 chunkGroup: ChunkGroup
837 ): void;
838 disconnectChunkGroup(chunkGroup: ChunkGroup): void;
839 getModuleId(module: Module): string | number;
840 setModuleId(module: Module, id: string | number): void;
841 getRuntimeId(runtime: string): string | number;
842 setRuntimeId(runtime: string, id: string | number): void;
843 hasModuleHashes(module: Module, runtime: RuntimeSpec): boolean;
844 getModuleHash(module: Module, runtime: RuntimeSpec): string;
845 getRenderedModuleHash(module: Module, runtime: RuntimeSpec): string;
846 setModuleHashes(
847 module: Module,
848 runtime: RuntimeSpec,
849 hash: string,
850 renderedHash: string
851 ): void;
852 addModuleRuntimeRequirements(
853 module: Module,
854 runtime: RuntimeSpec,
855 items: Set<string>
856 ): void;
857 addChunkRuntimeRequirements(chunk: Chunk, items: Set<string>): void;
858 addTreeRuntimeRequirements(chunk: Chunk, items: Iterable<string>): void;
859 getModuleRuntimeRequirements(
860 module: Module,
861 runtime: RuntimeSpec
862 ): ReadonlySet<string>;
863 getChunkRuntimeRequirements(chunk: Chunk): ReadonlySet<string>;
864 getModuleGraphHash(
865 module?: any,
866 runtime?: any,
867 withConnections?: boolean
868 ): any;
869 getTreeRuntimeRequirements(chunk: Chunk): ReadonlySet<string>;
870 static getChunkGraphForModule(
871 module: Module,
872 deprecateMessage: string,
873 deprecationCode: string
874 ): ChunkGraph;
875 static setChunkGraphForModule(module: Module, chunkGraph: ChunkGraph): void;
876 static getChunkGraphForChunk(
877 chunk: Chunk,
878 deprecateMessage: string,
879 deprecationCode: string
880 ): ChunkGraph;
881 static setChunkGraphForChunk(chunk: Chunk, chunkGraph: ChunkGraph): void;
882}
883declare abstract class ChunkGroup {
884 groupDebugId: number;
885 options: ChunkGroupOptions;
886 chunks: Chunk[];
887 origins: OriginRecord[];
888 index: number;
889
890 /**
891 * when a new chunk is added to a chunkGroup, addingOptions will occur.
892 */
893 addOptions(options: ChunkGroupOptions): void;
894
895 /**
896 * returns the name of current ChunkGroup
897 * sets a new name for current ChunkGroup
898 */
899 name?: string;
900
901 /**
902 * get a uniqueId for ChunkGroup, made up of its member Chunk debugId's
903 */
904 readonly debugId: string;
905
906 /**
907 * get a unique id for ChunkGroup, made up of its member Chunk id's
908 */
909 readonly id: string;
910
911 /**
912 * Performs an unshift of a specific chunk
913 */
914 unshiftChunk(chunk: Chunk): boolean;
915
916 /**
917 * inserts a chunk before another existing chunk in group
918 */
919 insertChunk(chunk: Chunk, before: Chunk): boolean;
920
921 /**
922 * add a chunk into ChunkGroup. Is pushed on or prepended
923 */
924 pushChunk(chunk: Chunk): boolean;
925 replaceChunk(oldChunk: Chunk, newChunk: Chunk): boolean;
926 removeChunk(chunk: Chunk): boolean;
927 isInitial(): boolean;
928 addChild(group: ChunkGroup): boolean;
929 getChildren(): ChunkGroup[];
930 getNumberOfChildren(): number;
931 readonly childrenIterable: SortableSet<ChunkGroup>;
932 removeChild(group: ChunkGroup): boolean;
933 addParent(parentChunk: ChunkGroup): boolean;
934 getParents(): ChunkGroup[];
935 getNumberOfParents(): number;
936 hasParent(parent: ChunkGroup): boolean;
937 readonly parentsIterable: SortableSet<ChunkGroup>;
938 removeParent(chunkGroup: ChunkGroup): boolean;
939 addAsyncEntrypoint(entrypoint: Entrypoint): boolean;
940 readonly asyncEntrypointsIterable: SortableSet<ChunkGroup>;
941 getBlocks(): any[];
942 getNumberOfBlocks(): number;
943 hasBlock(block?: any): boolean;
944 readonly blocksIterable: Iterable<AsyncDependenciesBlock>;
945 addBlock(block: AsyncDependenciesBlock): boolean;
946 addOrigin(module: Module, loc: DependencyLocation, request: string): void;
947 getFiles(): string[];
948 remove(): void;
949 sortItems(): void;
950
951 /**
952 * Sorting predicate which allows current ChunkGroup to be compared against another.
953 * Sorting values are based off of number of chunks in ChunkGroup.
954 */
955 compareTo(chunkGraph: ChunkGraph, otherGroup: ChunkGroup): 0 | 1 | -1;
956 getChildrenByOrders(
957 moduleGraph: ModuleGraph,
958 chunkGraph: ChunkGraph
959 ): Record<string, ChunkGroup[]>;
960
961 /**
962 * Sets the top-down index of a module in this ChunkGroup
963 */
964 setModulePreOrderIndex(module: Module, index: number): void;
965
966 /**
967 * Gets the top-down index of a module in this ChunkGroup
968 */
969 getModulePreOrderIndex(module: Module): number;
970
971 /**
972 * Sets the bottom-up index of a module in this ChunkGroup
973 */
974 setModulePostOrderIndex(module: Module, index: number): void;
975
976 /**
977 * Gets the bottom-up index of a module in this ChunkGroup
978 */
979 getModulePostOrderIndex(module: Module): number;
980 checkConstraints(): void;
981 getModuleIndex: (module: Module) => number;
982 getModuleIndex2: (module: Module) => number;
983}
984type ChunkGroupOptions = RawChunkGroupOptions & { name?: string };
985declare interface ChunkHashContext {
986 /**
987 * the runtime template
988 */
989 runtimeTemplate: RuntimeTemplate;
990
991 /**
992 * the module graph
993 */
994 moduleGraph: ModuleGraph;
995
996 /**
997 * the chunk graph
998 */
999 chunkGraph: ChunkGraph;
1000}
1001declare interface ChunkMaps {
1002 hash: Record<string | number, string>;
1003 contentHash: Record<string | number, Record<string, string>>;
1004 name: Record<string | number, string>;
1005}
1006declare class ChunkModuleIdRangePlugin {
1007 constructor(options?: any);
1008 options: any;
1009
1010 /**
1011 * Apply the plugin
1012 */
1013 apply(compiler: Compiler): void;
1014}
1015declare interface ChunkModuleMaps {
1016 id: Record<string | number, (string | number)[]>;
1017 hash: Record<string | number, string>;
1018}
1019declare interface ChunkPathData {
1020 id: string | number;
1021 name?: string;
1022 hash: string;
1023 hashWithLength?: (arg0: number) => string;
1024 contentHash?: Record<string, string>;
1025 contentHashWithLength?: Record<string, (length: number) => string>;
1026}
1027declare class ChunkPrefetchPreloadPlugin {
1028 constructor();
1029 apply(compiler: Compiler): void;
1030}
1031declare interface ChunkSizeOptions {
1032 /**
1033 * constant overhead for a chunk
1034 */
1035 chunkOverhead?: number;
1036
1037 /**
1038 * multiplicator for initial chunks
1039 */
1040 entryChunkMultiplicator?: number;
1041}
1042declare abstract class ChunkTemplate {
1043 hooks: Readonly<{
1044 renderManifest: { tap: (options?: any, fn?: any) => void };
1045 modules: { tap: (options?: any, fn?: any) => void };
1046 render: { tap: (options?: any, fn?: any) => void };
1047 renderWithEntry: { tap: (options?: any, fn?: any) => void };
1048 hash: { tap: (options?: any, fn?: any) => void };
1049 hashForChunk: { tap: (options?: any, fn?: any) => void };
1050 }>;
1051 readonly outputOptions: Output;
1052}
1053
1054/**
1055 * Advanced options for cleaning assets.
1056 */
1057declare interface CleanOptions {
1058 /**
1059 * Log the assets that should be removed instead of deleting them.
1060 */
1061 dry?: boolean;
1062
1063 /**
1064 * Keep these assets.
1065 */
1066 keep?: string | RegExp | ((filename: string) => boolean);
1067}
1068declare class CleanPlugin {
1069 constructor(options?: CleanOptions);
1070 options: {
1071 /**
1072 * Log the assets that should be removed instead of deleting them.
1073 */
1074 dry: boolean;
1075 /**
1076 * Keep these assets.
1077 */
1078 keep?: string | RegExp | ((filename: string) => boolean);
1079 };
1080
1081 /**
1082 * Apply the plugin
1083 */
1084 apply(compiler: Compiler): void;
1085 static getCompilationHooks(
1086 compilation: Compilation
1087 ): CleanPluginCompilationHooks;
1088}
1089declare interface CleanPluginCompilationHooks {
1090 /**
1091 * when returning true the file/directory will be kept during cleaning, returning false will clean it and ignore the following plugins and config
1092 */
1093 keep: SyncBailHook<[string], boolean>;
1094}
1095declare interface CodeGenerationContext {
1096 /**
1097 * the dependency templates
1098 */
1099 dependencyTemplates: DependencyTemplates;
1100
1101 /**
1102 * the runtime template
1103 */
1104 runtimeTemplate: RuntimeTemplate;
1105
1106 /**
1107 * the module graph
1108 */
1109 moduleGraph: ModuleGraph;
1110
1111 /**
1112 * the chunk graph
1113 */
1114 chunkGraph: ChunkGraph;
1115
1116 /**
1117 * the runtimes code should be generated for
1118 */
1119 runtime: RuntimeSpec;
1120
1121 /**
1122 * when in concatenated module, information about other concatenated modules
1123 */
1124 concatenationScope?: ConcatenationScope;
1125}
1126declare interface CodeGenerationResult {
1127 /**
1128 * the resulting sources for all source types
1129 */
1130 sources: Map<string, Source>;
1131
1132 /**
1133 * the resulting data for all source types
1134 */
1135 data?: Map<string, any>;
1136
1137 /**
1138 * the runtime requirements
1139 */
1140 runtimeRequirements: ReadonlySet<string>;
1141
1142 /**
1143 * a hash of the code generation result (will be automatically calculated from sources and runtimeRequirements if not provided)
1144 */
1145 hash?: string;
1146}
1147declare abstract class CodeGenerationResults {
1148 map: Map<Module, RuntimeSpecMap<CodeGenerationResult>>;
1149 get(module: Module, runtime: RuntimeSpec): CodeGenerationResult;
1150 has(module: Module, runtime: RuntimeSpec): boolean;
1151 getSource(module: Module, runtime: RuntimeSpec, sourceType: string): Source;
1152 getRuntimeRequirements(
1153 module: Module,
1154 runtime: RuntimeSpec
1155 ): ReadonlySet<string>;
1156 getData(module: Module, runtime: RuntimeSpec, key: string): any;
1157 getHash(module: Module, runtime: RuntimeSpec): any;
1158 add(module: Module, runtime: RuntimeSpec, result: CodeGenerationResult): void;
1159}
1160type CodeValue =
1161 | undefined
1162 | null
1163 | string
1164 | number
1165 | bigint
1166 | boolean
1167 | Function
1168 | RegExp
1169 | RuntimeValue
1170 | {
1171 [index: string]: RecursiveArrayOrRecord<
1172 | undefined
1173 | null
1174 | string
1175 | number
1176 | bigint
1177 | boolean
1178 | Function
1179 | RegExp
1180 | RuntimeValue
1181 >;
1182 }
1183 | RecursiveArrayOrRecord<
1184 | undefined
1185 | null
1186 | string
1187 | number
1188 | bigint
1189 | boolean
1190 | Function
1191 | RegExp
1192 | RuntimeValue
1193 >[];
1194declare interface Comparator<T> {
1195 (arg0: T, arg1: T): 0 | 1 | -1;
1196}
1197declare class CompatSource extends Source {
1198 constructor(sourceLike: SourceLike);
1199 static from(sourceLike: SourceLike): Source;
1200}
1201declare class Compilation {
1202 /**
1203 * Creates an instance of Compilation.
1204 */
1205 constructor(compiler: Compiler);
1206 hooks: Readonly<{
1207 buildModule: SyncHook<[Module]>;
1208 rebuildModule: SyncHook<[Module]>;
1209 failedModule: SyncHook<[Module, WebpackError]>;
1210 succeedModule: SyncHook<[Module]>;
1211 stillValidModule: SyncHook<[Module]>;
1212 addEntry: SyncHook<[Dependency, EntryOptions]>;
1213 failedEntry: SyncHook<[Dependency, EntryOptions, Error]>;
1214 succeedEntry: SyncHook<[Dependency, EntryOptions, Module]>;
1215 dependencyReferencedExports: SyncWaterfallHook<
1216 [(string[] | ReferencedExport)[], Dependency, RuntimeSpec]
1217 >;
1218 finishModules: AsyncSeriesHook<[Iterable<Module>]>;
1219 finishRebuildingModule: AsyncSeriesHook<[Module]>;
1220 unseal: SyncHook<[]>;
1221 seal: SyncHook<[]>;
1222 beforeChunks: SyncHook<[]>;
1223 afterChunks: SyncHook<[Iterable<Chunk>]>;
1224 optimizeDependencies: SyncBailHook<[Iterable<Module>], any>;
1225 afterOptimizeDependencies: SyncHook<[Iterable<Module>]>;
1226 optimize: SyncHook<[]>;
1227 optimizeModules: SyncBailHook<[Iterable<Module>], any>;
1228 afterOptimizeModules: SyncHook<[Iterable<Module>]>;
1229 optimizeChunks: SyncBailHook<[Iterable<Chunk>, ChunkGroup[]], any>;
1230 afterOptimizeChunks: SyncHook<[Iterable<Chunk>, ChunkGroup[]]>;
1231 optimizeTree: AsyncSeriesHook<[Iterable<Chunk>, Iterable<Module>]>;
1232 afterOptimizeTree: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
1233 optimizeChunkModules: AsyncSeriesBailHook<
1234 [Iterable<Chunk>, Iterable<Module>],
1235 any
1236 >;
1237 afterOptimizeChunkModules: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
1238 shouldRecord: SyncBailHook<[], boolean>;
1239 additionalChunkRuntimeRequirements: SyncHook<[Chunk, Set<string>]>;
1240 runtimeRequirementInChunk: HookMap<SyncBailHook<[Chunk, Set<string>], any>>;
1241 additionalModuleRuntimeRequirements: SyncHook<[Module, Set<string>]>;
1242 runtimeRequirementInModule: HookMap<
1243 SyncBailHook<[Module, Set<string>], any>
1244 >;
1245 additionalTreeRuntimeRequirements: SyncHook<[Chunk, Set<string>]>;
1246 runtimeRequirementInTree: HookMap<SyncBailHook<[Chunk, Set<string>], any>>;
1247 runtimeModule: SyncHook<[RuntimeModule, Chunk]>;
1248 reviveModules: SyncHook<[Iterable<Module>, any]>;
1249 beforeModuleIds: SyncHook<[Iterable<Module>]>;
1250 moduleIds: SyncHook<[Iterable<Module>]>;
1251 optimizeModuleIds: SyncHook<[Iterable<Module>]>;
1252 afterOptimizeModuleIds: SyncHook<[Iterable<Module>]>;
1253 reviveChunks: SyncHook<[Iterable<Chunk>, any]>;
1254 beforeChunkIds: SyncHook<[Iterable<Chunk>]>;
1255 chunkIds: SyncHook<[Iterable<Chunk>]>;
1256 optimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
1257 afterOptimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
1258 recordModules: SyncHook<[Iterable<Module>, any]>;
1259 recordChunks: SyncHook<[Iterable<Chunk>, any]>;
1260 optimizeCodeGeneration: SyncHook<[Iterable<Module>]>;
1261 beforeModuleHash: SyncHook<[]>;
1262 afterModuleHash: SyncHook<[]>;
1263 beforeCodeGeneration: SyncHook<[]>;
1264 afterCodeGeneration: SyncHook<[]>;
1265 beforeRuntimeRequirements: SyncHook<[]>;
1266 afterRuntimeRequirements: SyncHook<[]>;
1267 beforeHash: SyncHook<[]>;
1268 contentHash: SyncHook<[Chunk]>;
1269 afterHash: SyncHook<[]>;
1270 recordHash: SyncHook<[any]>;
1271 record: SyncHook<[Compilation, any]>;
1272 beforeModuleAssets: SyncHook<[]>;
1273 shouldGenerateChunkAssets: SyncBailHook<[], boolean>;
1274 beforeChunkAssets: SyncHook<[]>;
1275 additionalChunkAssets: FakeHook<
1276 Pick<
1277 AsyncSeriesHook<[Set<Chunk>]>,
1278 "tap" | "tapAsync" | "tapPromise" | "name"
1279 >
1280 >;
1281 additionalAssets: FakeHook<
1282 Pick<AsyncSeriesHook<[]>, "tap" | "tapAsync" | "tapPromise" | "name">
1283 >;
1284 optimizeChunkAssets: FakeHook<
1285 Pick<
1286 AsyncSeriesHook<[Set<Chunk>]>,
1287 "tap" | "tapAsync" | "tapPromise" | "name"
1288 >
1289 >;
1290 afterOptimizeChunkAssets: FakeHook<
1291 Pick<
1292 AsyncSeriesHook<[Set<Chunk>]>,
1293 "tap" | "tapAsync" | "tapPromise" | "name"
1294 >
1295 >;
1296 optimizeAssets: AsyncSeriesHook<
1297 [CompilationAssets],
1298 ProcessAssetsAdditionalOptions
1299 >;
1300 afterOptimizeAssets: SyncHook<[CompilationAssets]>;
1301 processAssets: AsyncSeriesHook<
1302 [CompilationAssets],
1303 ProcessAssetsAdditionalOptions
1304 >;
1305 afterProcessAssets: SyncHook<[CompilationAssets]>;
1306 processAdditionalAssets: AsyncSeriesHook<[CompilationAssets]>;
1307 needAdditionalSeal: SyncBailHook<[], boolean>;
1308 afterSeal: AsyncSeriesHook<[]>;
1309 renderManifest: SyncWaterfallHook<
1310 [RenderManifestEntry[], RenderManifestOptions]
1311 >;
1312 fullHash: SyncHook<[Hash]>;
1313 chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
1314 moduleAsset: SyncHook<[Module, string]>;
1315 chunkAsset: SyncHook<[Chunk, string]>;
1316 assetPath: SyncWaterfallHook<[string, object, AssetInfo]>;
1317 needAdditionalPass: SyncBailHook<[], boolean>;
1318 childCompiler: SyncHook<[Compiler, string, number]>;
1319 log: SyncBailHook<[string, LogEntry], true>;
1320 processWarnings: SyncWaterfallHook<[WebpackError[]]>;
1321 processErrors: SyncWaterfallHook<[WebpackError[]]>;
1322 statsPreset: HookMap<
1323 SyncHook<[Partial<NormalizedStatsOptions>, CreateStatsOptionsContext]>
1324 >;
1325 statsNormalize: SyncHook<
1326 [Partial<NormalizedStatsOptions>, CreateStatsOptionsContext]
1327 >;
1328 statsFactory: SyncHook<[StatsFactory, NormalizedStatsOptions]>;
1329 statsPrinter: SyncHook<[StatsPrinter, NormalizedStatsOptions]>;
1330 readonly normalModuleLoader: SyncHook<[object, NormalModule]>;
1331 }>;
1332 name?: string;
1333 startTime: any;
1334 endTime: any;
1335 compiler: Compiler;
1336 resolverFactory: ResolverFactory;
1337 inputFileSystem: InputFileSystem;
1338 fileSystemInfo: FileSystemInfo;
1339 requestShortener: RequestShortener;
1340 compilerPath: string;
1341 logger: WebpackLogger;
1342 options: WebpackOptionsNormalized;
1343 outputOptions: OutputNormalized;
1344 bail: boolean;
1345 profile: boolean;
1346 mainTemplate: MainTemplate;
1347 chunkTemplate: ChunkTemplate;
1348 runtimeTemplate: RuntimeTemplate;
1349 moduleTemplates: { javascript: ModuleTemplate };
1350 moduleGraph: ModuleGraph;
1351 chunkGraph?: ChunkGraph;
1352 codeGenerationResults: CodeGenerationResults;
1353 processDependenciesQueue: AsyncQueue<Module, Module, Module>;
1354 addModuleQueue: AsyncQueue<Module, string, Module>;
1355 factorizeQueue: AsyncQueue<FactorizeModuleOptions, string, Module>;
1356 buildQueue: AsyncQueue<Module, Module, Module>;
1357 rebuildQueue: AsyncQueue<Module, Module, Module>;
1358
1359 /**
1360 * Modules in value are building during the build of Module in key.
1361 * Means value blocking key from finishing.
1362 * Needed to detect build cycles.
1363 */
1364 creatingModuleDuringBuild: WeakMap<Module, Set<Module>>;
1365 entries: Map<string, EntryData>;
1366 globalEntry: EntryData;
1367 entrypoints: Map<string, Entrypoint>;
1368 asyncEntrypoints: Entrypoint[];
1369 chunks: Set<Chunk>;
1370 chunkGroups: ChunkGroup[];
1371 namedChunkGroups: Map<string, ChunkGroup>;
1372 namedChunks: Map<string, Chunk>;
1373 modules: Set<Module>;
1374 records: any;
1375 additionalChunkAssets: string[];
1376 assets: CompilationAssets;
1377 assetsInfo: Map<string, AssetInfo>;
1378 errors: WebpackError[];
1379 warnings: WebpackError[];
1380 children: Compilation[];
1381 logging: Map<string, LogEntry[]>;
1382 dependencyFactories: Map<DepConstructor, ModuleFactory>;
1383 dependencyTemplates: DependencyTemplates;
1384 childrenCounters: object;
1385 usedChunkIds: Set<string | number>;
1386 usedModuleIds: Set<number>;
1387 needAdditionalPass: boolean;
1388 builtModules: WeakSet<Module>;
1389 codeGeneratedModules: WeakSet<Module>;
1390 emittedAssets: Set<string>;
1391 comparedForEmitAssets: Set<string>;
1392 fileDependencies: LazySet<string>;
1393 contextDependencies: LazySet<string>;
1394 missingDependencies: LazySet<string>;
1395 buildDependencies: LazySet<string>;
1396 compilationDependencies: { add: (item?: any) => LazySet<string> };
1397 getStats(): Stats;
1398 createStatsOptions(
1399 optionsOrPreset: string | StatsOptions,
1400 context?: CreateStatsOptionsContext
1401 ): NormalizedStatsOptions;
1402 createStatsFactory(options?: any): StatsFactory;
1403 createStatsPrinter(options?: any): StatsPrinter;
1404 getCache(name: string): CacheFacade;
1405 getLogger(name: string | (() => string)): WebpackLogger;
1406 addModule(
1407 module: Module,
1408 callback: (err?: WebpackError, result?: Module) => void
1409 ): void;
1410
1411 /**
1412 * Fetches a module from a compilation by its identifier
1413 */
1414 getModule(module: Module): Module;
1415
1416 /**
1417 * Attempts to search for a module by its identifier
1418 */
1419 findModule(identifier: string): undefined | Module;
1420
1421 /**
1422 * Schedules a build of the module object
1423 */
1424 buildModule(
1425 module: Module,
1426 callback: (err?: WebpackError, result?: Module) => void
1427 ): void;
1428 processModuleDependencies(
1429 module: Module,
1430 callback: (err?: WebpackError, result?: Module) => void
1431 ): void;
1432 processModuleDependenciesNonRecursive(module: Module): void;
1433 handleModuleCreation(
1434 __0: HandleModuleCreationOptions,
1435 callback: (err?: WebpackError, result?: Module) => void
1436 ): void;
1437 factorizeModule(
1438 options: FactorizeModuleOptions,
1439 callback: (err?: WebpackError, result?: Module) => void
1440 ): void;
1441 addModuleChain(
1442 context: string,
1443 dependency: Dependency,
1444 callback: (err?: WebpackError, result?: Module) => void
1445 ): void;
1446 addModuleTree(
1447 __0: {
1448 /**
1449 * context string path
1450 */
1451 context: string;
1452 /**
1453 * dependency used to create Module chain
1454 */
1455 dependency: Dependency;
1456 /**
1457 * additional context info for the root module
1458 */
1459 contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>;
1460 },
1461 callback: (err?: WebpackError, result?: Module) => void
1462 ): void;
1463 addEntry(
1464 context: string,
1465 entry: Dependency,
1466 optionsOrName: string | EntryOptions,
1467 callback: (err?: WebpackError, result?: Module) => void
1468 ): void;
1469 addInclude(
1470 context: string,
1471 dependency: Dependency,
1472 options: EntryOptions,
1473 callback: (err?: WebpackError, result?: Module) => void
1474 ): void;
1475 rebuildModule(
1476 module: Module,
1477 callback: (err?: WebpackError, result?: Module) => void
1478 ): void;
1479 finish(callback?: any): void;
1480 unseal(): void;
1481 seal(callback: (err?: WebpackError) => void): void;
1482 reportDependencyErrorsAndWarnings(
1483 module: Module,
1484 blocks: DependenciesBlock[]
1485 ): void;
1486 codeGeneration(callback?: any): void;
1487 processRuntimeRequirements(): void;
1488 addRuntimeModule(chunk: Chunk, module: RuntimeModule): void;
1489 addChunkInGroup(
1490 groupOptions: string | ChunkGroupOptions,
1491 module: Module,
1492 loc: DependencyLocation,
1493 request: string
1494 ): ChunkGroup;
1495 addAsyncEntrypoint(
1496 options: EntryOptions,
1497 module: Module,
1498 loc: DependencyLocation,
1499 request: string
1500 ): Entrypoint;
1501
1502 /**
1503 * This method first looks to see if a name is provided for a new chunk,
1504 * and first looks to see if any named chunks already exist and reuse that chunk instead.
1505 */
1506 addChunk(name?: string): Chunk;
1507 assignDepth(module: Module): void;
1508 getDependencyReferencedExports(
1509 dependency: Dependency,
1510 runtime: RuntimeSpec
1511 ): (string[] | ReferencedExport)[];
1512 removeReasonsOfDependencyBlock(
1513 module: Module,
1514 block: DependenciesBlockLike
1515 ): void;
1516 patchChunksAfterReasonRemoval(module: Module, chunk: Chunk): void;
1517 removeChunkFromDependencies(block: DependenciesBlock, chunk: Chunk): void;
1518 assignRuntimeIds(): void;
1519 sortItemsWithChunkIds(): void;
1520 summarizeDependencies(): void;
1521 createModuleHashes(): void;
1522 createHash(): {
1523 module: Module;
1524 hash: string;
1525 runtime: RuntimeSpec;
1526 runtimes: RuntimeSpec[];
1527 }[];
1528 fullHash?: string;
1529 hash?: string;
1530 emitAsset(file: string, source: Source, assetInfo?: AssetInfo): void;
1531 updateAsset(
1532 file: string,
1533 newSourceOrFunction: Source | ((arg0: Source) => Source),
1534 assetInfoUpdateOrFunction?: AssetInfo | ((arg0?: AssetInfo) => AssetInfo)
1535 ): void;
1536 renameAsset(file?: any, newFile?: any): void;
1537 deleteAsset(file: string): void;
1538 getAssets(): Readonly<Asset>[];
1539 getAsset(name: string): undefined | Readonly<Asset>;
1540 clearAssets(): void;
1541 createModuleAssets(): void;
1542 getRenderManifest(options: RenderManifestOptions): RenderManifestEntry[];
1543 createChunkAssets(callback: (err?: WebpackError) => void): void;
1544 getPath(
1545 filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
1546 data?: PathData
1547 ): string;
1548 getPathWithInfo(
1549 filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
1550 data?: PathData
1551 ): { path: string; info: AssetInfo };
1552 getAssetPath(
1553 filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
1554 data: PathData
1555 ): string;
1556 getAssetPathWithInfo(
1557 filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
1558 data: PathData
1559 ): { path: string; info: AssetInfo };
1560 getWarnings(): WebpackError[];
1561 getErrors(): WebpackError[];
1562
1563 /**
1564 * This function allows you to run another instance of webpack inside of webpack however as
1565 * a child with different settings and configurations (if desired) applied. It copies all hooks, plugins
1566 * from parent (or top level compiler) and creates a child Compilation
1567 */
1568 createChildCompiler(
1569 name: string,
1570 outputOptions: OutputNormalized,
1571 plugins: (
1572 | ((this: Compiler, compiler: Compiler) => void)
1573 | WebpackPluginInstance
1574 )[]
1575 ): Compiler;
1576 checkConstraints(): void;
1577
1578 /**
1579 * Add additional assets to the compilation.
1580 */
1581 static PROCESS_ASSETS_STAGE_ADDITIONAL: number;
1582
1583 /**
1584 * Basic preprocessing of assets.
1585 */
1586 static PROCESS_ASSETS_STAGE_PRE_PROCESS: number;
1587
1588 /**
1589 * Derive new assets from existing assets.
1590 * Existing assets should not be treated as complete.
1591 */
1592 static PROCESS_ASSETS_STAGE_DERIVED: number;
1593
1594 /**
1595 * Add additional sections to existing assets, like a banner or initialization code.
1596 */
1597 static PROCESS_ASSETS_STAGE_ADDITIONS: number;
1598
1599 /**
1600 * Optimize existing assets in a general way.
1601 */
1602 static PROCESS_ASSETS_STAGE_OPTIMIZE: number;
1603
1604 /**
1605 * Optimize the count of existing assets, e. g. by merging them.
1606 * Only assets of the same type should be merged.
1607 * For assets of different types see PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE.
1608 */
1609 static PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT: number;
1610
1611 /**
1612 * Optimize the compatibility of existing assets, e. g. add polyfills or vendor-prefixes.
1613 */
1614 static PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY: number;
1615
1616 /**
1617 * Optimize the size of existing assets, e. g. by minimizing or omitting whitespace.
1618 */
1619 static PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE: number;
1620
1621 /**
1622 * Add development tooling to assets, e. g. by extracting a SourceMap.
1623 */
1624 static PROCESS_ASSETS_STAGE_DEV_TOOLING: number;
1625
1626 /**
1627 * Optimize the count of existing assets, e. g. by inlining assets of into other assets.
1628 * Only assets of different types should be inlined.
1629 * For assets of the same type see PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT.
1630 */
1631 static PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE: number;
1632
1633 /**
1634 * Summarize the list of existing assets
1635 * e. g. creating an assets manifest of Service Workers.
1636 */
1637 static PROCESS_ASSETS_STAGE_SUMMARIZE: number;
1638
1639 /**
1640 * Optimize the hashes of the assets, e. g. by generating real hashes of the asset content.
1641 */
1642 static PROCESS_ASSETS_STAGE_OPTIMIZE_HASH: number;
1643
1644 /**
1645 * Optimize the transfer of existing assets, e. g. by preparing a compressed (gzip) file as separate asset.
1646 */
1647 static PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER: number;
1648
1649 /**
1650 * Analyse existing assets.
1651 */
1652 static PROCESS_ASSETS_STAGE_ANALYSE: number;
1653
1654 /**
1655 * Creating assets for reporting purposes.
1656 */
1657 static PROCESS_ASSETS_STAGE_REPORT: number;
1658}
1659declare interface CompilationAssets {
1660 [index: string]: Source;
1661}
1662declare interface CompilationHooksAsyncWebAssemblyModulesPlugin {
1663 renderModuleContent: SyncWaterfallHook<[Source, Module, RenderContextObject]>;
1664}
1665declare interface CompilationHooksJavascriptModulesPlugin {
1666 renderModuleContent: SyncWaterfallHook<[Source, Module, RenderContextObject]>;
1667 renderModuleContainer: SyncWaterfallHook<
1668 [Source, Module, RenderContextObject]
1669 >;
1670 renderModulePackage: SyncWaterfallHook<[Source, Module, RenderContextObject]>;
1671 renderChunk: SyncWaterfallHook<[Source, RenderContextObject]>;
1672 renderMain: SyncWaterfallHook<[Source, RenderContextObject]>;
1673 render: SyncWaterfallHook<[Source, RenderContextObject]>;
1674 renderStartup: SyncWaterfallHook<[Source, Module, StartupRenderContext]>;
1675 renderRequire: SyncWaterfallHook<[string, RenderBootstrapContext]>;
1676 inlineInRuntimeBailout: SyncBailHook<
1677 [Module, RenderBootstrapContext],
1678 string
1679 >;
1680 embedInRuntimeBailout: SyncBailHook<[Module, RenderContextObject], string>;
1681 chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
1682 useSourceMap: SyncBailHook<[Chunk, RenderContextObject], boolean>;
1683}
1684declare interface CompilationHooksRealContentHashPlugin {
1685 updateHash: SyncBailHook<[Buffer[], string], string>;
1686}
1687declare interface CompilationParams {
1688 normalModuleFactory: NormalModuleFactory;
1689 contextModuleFactory: ContextModuleFactory;
1690}
1691declare class Compiler {
1692 constructor(context: string);
1693 hooks: Readonly<{
1694 initialize: SyncHook<[]>;
1695 shouldEmit: SyncBailHook<[Compilation], boolean>;
1696 done: AsyncSeriesHook<[Stats]>;
1697 afterDone: SyncHook<[Stats]>;
1698 additionalPass: AsyncSeriesHook<[]>;
1699 beforeRun: AsyncSeriesHook<[Compiler]>;
1700 run: AsyncSeriesHook<[Compiler]>;
1701 emit: AsyncSeriesHook<[Compilation]>;
1702 assetEmitted: AsyncSeriesHook<[string, AssetEmittedInfo]>;
1703 afterEmit: AsyncSeriesHook<[Compilation]>;
1704 thisCompilation: SyncHook<[Compilation, CompilationParams]>;
1705 compilation: SyncHook<[Compilation, CompilationParams]>;
1706 normalModuleFactory: SyncHook<[NormalModuleFactory]>;
1707 contextModuleFactory: SyncHook<[ContextModuleFactory]>;
1708 beforeCompile: AsyncSeriesHook<[CompilationParams]>;
1709 compile: SyncHook<[CompilationParams]>;
1710 make: AsyncParallelHook<[Compilation]>;
1711 finishMake: AsyncParallelHook<[Compilation]>;
1712 afterCompile: AsyncSeriesHook<[Compilation]>;
1713 watchRun: AsyncSeriesHook<[Compiler]>;
1714 failed: SyncHook<[Error]>;
1715 invalid: SyncHook<[null | string, number]>;
1716 watchClose: SyncHook<[]>;
1717 shutdown: AsyncSeriesHook<[]>;
1718 infrastructureLog: SyncBailHook<[string, string, any[]], true>;
1719 environment: SyncHook<[]>;
1720 afterEnvironment: SyncHook<[]>;
1721 afterPlugins: SyncHook<[Compiler]>;
1722 afterResolvers: SyncHook<[Compiler]>;
1723 entryOption: SyncBailHook<[string, EntryNormalized], boolean>;
1724 }>;
1725 webpack: typeof exports;
1726 name?: string;
1727 parentCompilation?: Compilation;
1728 root: Compiler;
1729 outputPath: string;
1730 watching: Watching;
1731 outputFileSystem: OutputFileSystem;
1732 intermediateFileSystem: IntermediateFileSystem;
1733 inputFileSystem: InputFileSystem;
1734 watchFileSystem: WatchFileSystem;
1735 recordsInputPath: null | string;
1736 recordsOutputPath: null | string;
1737 records: object;
1738 managedPaths: Set<string>;
1739 immutablePaths: Set<string>;
1740 modifiedFiles: Set<string>;
1741 removedFiles: Set<string>;
1742 fileTimestamps: Map<string, null | FileSystemInfoEntry | "ignore">;
1743 contextTimestamps: Map<string, null | FileSystemInfoEntry | "ignore">;
1744 resolverFactory: ResolverFactory;
1745 infrastructureLogger: any;
1746 options: WebpackOptionsNormalized;
1747 context: string;
1748 requestShortener: RequestShortener;
1749 cache: Cache;
1750 compilerPath: string;
1751 running: boolean;
1752 idle: boolean;
1753 watchMode: boolean;
1754 getCache(name: string): CacheFacade;
1755 getInfrastructureLogger(name: string | (() => string)): WebpackLogger;
1756 watch(watchOptions: WatchOptions, handler: CallbackFunction<Stats>): Watching;
1757 run(callback: CallbackFunction<Stats>): void;
1758 runAsChild(
1759 callback: (err?: Error, entries?: Chunk[], compilation?: Compilation) => any
1760 ): void;
1761 purgeInputFileSystem(): void;
1762 emitAssets(compilation: Compilation, callback: CallbackFunction<void>): void;
1763 emitRecords(callback: CallbackFunction<void>): void;
1764 readRecords(callback: CallbackFunction<void>): void;
1765 createChildCompiler(
1766 compilation: Compilation,
1767 compilerName: string,
1768 compilerIndex: number,
1769 outputOptions: OutputNormalized,
1770 plugins: WebpackPluginInstance[]
1771 ): Compiler;
1772 isChild(): boolean;
1773 createCompilation(): Compilation;
1774 newCompilation(params: CompilationParams): Compilation;
1775 createNormalModuleFactory(): NormalModuleFactory;
1776 createContextModuleFactory(): ContextModuleFactory;
1777 newCompilationParams(): {
1778 normalModuleFactory: NormalModuleFactory;
1779 contextModuleFactory: ContextModuleFactory;
1780 };
1781 compile(callback: CallbackFunction<Compilation>): void;
1782 close(callback: CallbackFunction<void>): void;
1783}
1784declare class ConcatSource extends Source {
1785 constructor(...args: (string | Source)[]);
1786 getChildren(): Source[];
1787 add(item: string | Source): void;
1788 addAllSkipOptimizing(items: Source[]): void;
1789}
1790declare interface ConcatenatedModuleInfo {
1791 index: number;
1792 module: Module;
1793
1794 /**
1795 * mapping from export name to symbol
1796 */
1797 exportMap: Map<string, string>;
1798
1799 /**
1800 * mapping from export name to symbol
1801 */
1802 rawExportMap: Map<string, string>;
1803 namespaceExportSymbol?: string;
1804}
1805declare interface ConcatenationBailoutReasonContext {
1806 /**
1807 * the module graph
1808 */
1809 moduleGraph: ModuleGraph;
1810
1811 /**
1812 * the chunk graph
1813 */
1814 chunkGraph: ChunkGraph;
1815}
1816declare class ConcatenationScope {
1817 constructor(
1818 modulesMap: ModuleInfo[] | Map<Module, ModuleInfo>,
1819 currentModule: ConcatenatedModuleInfo
1820 );
1821 isModuleInScope(module: Module): boolean;
1822 registerExport(exportName: string, symbol: string): void;
1823 registerRawExport(exportName: string, expression: string): void;
1824 registerNamespaceExport(symbol: string): void;
1825 createModuleReference(
1826 module: Module,
1827 __1: Partial<ModuleReferenceOptions>
1828 ): string;
1829 static isModuleReference(name: string): boolean;
1830 static matchModuleReference(
1831 name: string
1832 ): ModuleReferenceOptions & { index: number };
1833 static DEFAULT_EXPORT: string;
1834 static NAMESPACE_OBJECT_EXPORT: string;
1835}
1836
1837/**
1838 * Options object as provided by the user.
1839 */
1840declare interface Configuration {
1841 /**
1842 * Set the value of `require.amd` and `define.amd`. Or disable AMD support.
1843 */
1844 amd?: false | { [index: string]: any };
1845
1846 /**
1847 * Report the first error as a hard error instead of tolerating it.
1848 */
1849 bail?: boolean;
1850
1851 /**
1852 * Cache generated modules and chunks to improve performance for multiple incremental builds.
1853 */
1854 cache?: boolean | MemoryCacheOptions | FileCacheOptions;
1855
1856 /**
1857 * The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
1858 */
1859 context?: string;
1860
1861 /**
1862 * References to other configurations to depend on.
1863 */
1864 dependencies?: string[];
1865
1866 /**
1867 * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
1868 */
1869 devtool?: string | false;
1870
1871 /**
1872 * The entry point(s) of the compilation.
1873 */
1874 entry?:
1875 | string
1876 | (() => string | EntryObject | string[] | Promise<EntryStatic>)
1877 | EntryObject
1878 | string[];
1879
1880 /**
1881 * Enables/Disables experiments (experimental features with relax SemVer compatibility).
1882 */
1883 experiments?: Experiments;
1884
1885 /**
1886 * 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`.
1887 */
1888 externals?:
1889 | string
1890 | RegExp
1891 | ExternalItem[]
1892 | (ExternalItemObjectKnown & ExternalItemObjectUnknown)
1893 | ((
1894 data: ExternalItemFunctionData,
1895 callback: (
1896 err?: Error,
1897 result?: string | boolean | string[] | { [index: string]: any }
1898 ) => void
1899 ) => void)
1900 | ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
1901
1902 /**
1903 * Enable presets of externals for specific targets.
1904 */
1905 externalsPresets?: ExternalsPresets;
1906
1907 /**
1908 * Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
1909 */
1910 externalsType?:
1911 | "var"
1912 | "module"
1913 | "assign"
1914 | "this"
1915 | "window"
1916 | "self"
1917 | "global"
1918 | "commonjs"
1919 | "commonjs2"
1920 | "commonjs-module"
1921 | "amd"
1922 | "amd-require"
1923 | "umd"
1924 | "umd2"
1925 | "jsonp"
1926 | "system"
1927 | "promise"
1928 | "import"
1929 | "script";
1930
1931 /**
1932 * Ignore specific warnings.
1933 */
1934 ignoreWarnings?: (
1935 | RegExp
1936 | {
1937 /**
1938 * A RegExp to select the origin file for the warning.
1939 */
1940 file?: RegExp;
1941 /**
1942 * A RegExp to select the warning message.
1943 */
1944 message?: RegExp;
1945 /**
1946 * A RegExp to select the origin module for the warning.
1947 */
1948 module?: RegExp;
1949 }
1950 | ((warning: WebpackError, compilation: Compilation) => boolean)
1951 )[];
1952
1953 /**
1954 * Options for infrastructure level logging.
1955 */
1956 infrastructureLogging?: InfrastructureLogging;
1957
1958 /**
1959 * Custom values available in the loader context.
1960 */
1961 loader?: Loader;
1962
1963 /**
1964 * Enable production optimizations or development hints.
1965 */
1966 mode?: "development" | "production" | "none";
1967
1968 /**
1969 * Options affecting the normal modules (`NormalModuleFactory`).
1970 */
1971 module?: ModuleOptions;
1972
1973 /**
1974 * Name of the configuration. Used when loading multiple configurations.
1975 */
1976 name?: string;
1977
1978 /**
1979 * Include polyfills or mocks for various node stuff.
1980 */
1981 node?: false | NodeOptions;
1982
1983 /**
1984 * Enables/Disables integrated optimizations.
1985 */
1986 optimization?: Optimization;
1987
1988 /**
1989 * Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
1990 */
1991 output?: Output;
1992
1993 /**
1994 * The number of parallel processed modules in the compilation.
1995 */
1996 parallelism?: number;
1997
1998 /**
1999 * Configuration for web performance recommendations.
2000 */
2001 performance?: false | PerformanceOptions;
2002
2003 /**
2004 * Add additional plugins to the compiler.
2005 */
2006 plugins?: (
2007 | ((this: Compiler, compiler: Compiler) => void)
2008 | WebpackPluginInstance
2009 )[];
2010
2011 /**
2012 * Capture timing information for each module.
2013 */
2014 profile?: boolean;
2015
2016 /**
2017 * Store compiler state to a json file.
2018 */
2019 recordsInputPath?: string | false;
2020
2021 /**
2022 * Load compiler state from a json file.
2023 */
2024 recordsOutputPath?: string | false;
2025
2026 /**
2027 * 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.
2028 */
2029 recordsPath?: string | false;
2030
2031 /**
2032 * Options for the resolver.
2033 */
2034 resolve?: ResolveOptionsWebpackOptions;
2035
2036 /**
2037 * Options for the resolver when resolving loaders.
2038 */
2039 resolveLoader?: ResolveOptionsWebpackOptions;
2040
2041 /**
2042 * Options affecting how file system snapshots are created and validated.
2043 */
2044 snapshot?: SnapshotOptions;
2045
2046 /**
2047 * Stats options object or preset name.
2048 */
2049 stats?:
2050 | boolean
2051 | "none"
2052 | "summary"
2053 | "errors-only"
2054 | "errors-warnings"
2055 | "minimal"
2056 | "normal"
2057 | "detailed"
2058 | "verbose"
2059 | StatsOptions;
2060
2061 /**
2062 * Environment to build for. An array of environments to build for all of them when possible.
2063 */
2064 target?: string | false | string[];
2065
2066 /**
2067 * Enter watch mode, which rebuilds on file change.
2068 */
2069 watch?: boolean;
2070
2071 /**
2072 * Options for the watcher.
2073 */
2074 watchOptions?: WatchOptions;
2075}
2076type ConnectionState =
2077 | boolean
2078 | typeof TRANSITIVE_ONLY
2079 | typeof CIRCULAR_CONNECTION;
2080declare interface Constructor {
2081 new (...params: any[]): any;
2082}
2083declare class ConsumeSharedPlugin {
2084 constructor(options: ConsumeSharedPluginOptions);
2085
2086 /**
2087 * Apply the plugin
2088 */
2089 apply(compiler: Compiler): void;
2090}
2091
2092/**
2093 * Options for consuming shared modules.
2094 */
2095declare interface ConsumeSharedPluginOptions {
2096 /**
2097 * Modules that should be consumed from share scope. When provided, property names are used to match requested modules in this compilation.
2098 */
2099 consumes: Consumes;
2100
2101 /**
2102 * Share scope name used for all consumed modules (defaults to 'default').
2103 */
2104 shareScope?: string;
2105}
2106type Consumes = (string | ConsumesObject)[] | ConsumesObject;
2107
2108/**
2109 * Advanced configuration for modules that should be consumed from share scope.
2110 */
2111declare interface ConsumesConfig {
2112 /**
2113 * Include the fallback module directly instead behind an async request. This allows to use fallback module in initial load too. All possible shared modules need to be eager too.
2114 */
2115 eager?: boolean;
2116
2117 /**
2118 * Fallback module if no shared module is found in share scope. Defaults to the property name.
2119 */
2120 import?: string | false;
2121
2122 /**
2123 * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.
2124 */
2125 packageName?: string;
2126
2127 /**
2128 * Version requirement from module in share scope.
2129 */
2130 requiredVersion?: string | false;
2131
2132 /**
2133 * Module is looked up under this key from the share scope.
2134 */
2135 shareKey?: string;
2136
2137 /**
2138 * Share scope name.
2139 */
2140 shareScope?: string;
2141
2142 /**
2143 * Allow only a single version of the shared module in share scope (disabled by default).
2144 */
2145 singleton?: boolean;
2146
2147 /**
2148 * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
2149 */
2150 strictVersion?: boolean;
2151}
2152
2153/**
2154 * Modules that should be consumed from share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.
2155 */
2156declare interface ConsumesObject {
2157 [index: string]: string | ConsumesConfig;
2158}
2159type ContainerOptionsFormat<T> =
2160 | Record<string, string | string[] | T>
2161 | (string | Record<string, string | string[] | T>)[];
2162declare class ContainerPlugin {
2163 constructor(options: ContainerPluginOptions);
2164
2165 /**
2166 * Apply the plugin
2167 */
2168 apply(compiler: Compiler): void;
2169}
2170declare interface ContainerPluginOptions {
2171 /**
2172 * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.
2173 */
2174 exposes: Exposes;
2175
2176 /**
2177 * The filename for this container relative path inside the `output.path` directory.
2178 */
2179 filename?: string;
2180
2181 /**
2182 * Options for library.
2183 */
2184 library?: LibraryOptions;
2185
2186 /**
2187 * The name for this container.
2188 */
2189 name: string;
2190
2191 /**
2192 * The name of the share scope which is shared with the host (defaults to 'default').
2193 */
2194 shareScope?: string;
2195}
2196declare class ContainerReferencePlugin {
2197 constructor(options: ContainerReferencePluginOptions);
2198
2199 /**
2200 * Apply the plugin
2201 */
2202 apply(compiler: Compiler): void;
2203}
2204declare interface ContainerReferencePluginOptions {
2205 /**
2206 * The external type of the remote containers.
2207 */
2208 remoteType: ExternalsType;
2209
2210 /**
2211 * Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.
2212 */
2213 remotes: Remotes;
2214
2215 /**
2216 * The name of the share scope shared with all remotes (defaults to 'default').
2217 */
2218 shareScope?: string;
2219}
2220declare abstract class ContextElementDependency extends ModuleDependency {
2221 referencedExports: any;
2222}
2223declare class ContextExclusionPlugin {
2224 constructor(negativeMatcher: RegExp);
2225 negativeMatcher: RegExp;
2226
2227 /**
2228 * Apply the plugin
2229 */
2230 apply(compiler: Compiler): void;
2231}
2232type ContextMode =
2233 | "sync"
2234 | "eager"
2235 | "weak"
2236 | "async-weak"
2237 | "lazy"
2238 | "lazy-once";
2239declare abstract class ContextModuleFactory extends ModuleFactory {
2240 hooks: Readonly<{
2241 beforeResolve: AsyncSeriesWaterfallHook<[any]>;
2242 afterResolve: AsyncSeriesWaterfallHook<[any]>;
2243 contextModuleFiles: SyncWaterfallHook<[string[]]>;
2244 alternatives: FakeHook<
2245 Pick<
2246 AsyncSeriesWaterfallHook<[any[]]>,
2247 "tap" | "tapAsync" | "tapPromise" | "name"
2248 >
2249 >;
2250 alternativeRequests: AsyncSeriesWaterfallHook<
2251 [any[], ContextModuleOptions]
2252 >;
2253 }>;
2254 resolverFactory: ResolverFactory;
2255 resolveDependencies(
2256 fs: InputFileSystem,
2257 options: ContextModuleOptions,
2258 callback: (err?: Error, dependencies?: ContextElementDependency[]) => any
2259 ): void;
2260}
2261
2262declare interface ContextModuleOptions {
2263 mode: ContextMode;
2264 recursive: boolean;
2265 regExp: RegExp;
2266 namespaceObject?: boolean | "strict";
2267 addon?: string;
2268 chunkName?: string;
2269 include?: RegExp;
2270 exclude?: RegExp;
2271 groupOptions?: RawChunkGroupOptions;
2272 category?: string;
2273
2274 /**
2275 * exports referenced from modules (won't be mangled)
2276 */
2277 referencedExports?: string[][];
2278 resource: string;
2279 resourceQuery?: string;
2280 resourceFragment?: string;
2281 resolveOptions: any;
2282}
2283declare class ContextReplacementPlugin {
2284 constructor(
2285 resourceRegExp?: any,
2286 newContentResource?: any,
2287 newContentRecursive?: any,
2288 newContentRegExp?: any
2289 );
2290 resourceRegExp: any;
2291 newContentCallback: any;
2292 newContentResource: any;
2293 newContentCreateContextMap: any;
2294 newContentRecursive: any;
2295 newContentRegExp: any;
2296 apply(compiler?: any): void;
2297}
2298type CreateStatsOptionsContext = KnownCreateStatsOptionsContext &
2299 Record<string, any>;
2300type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
2301declare class DefinePlugin {
2302 /**
2303 * Create a new define plugin
2304 */
2305 constructor(definitions: Record<string, CodeValue>);
2306 definitions: Record<string, CodeValue>;
2307
2308 /**
2309 * Apply the plugin
2310 */
2311 apply(compiler: Compiler): void;
2312 static runtimeValue(fn?: any, fileDependencies?: any): RuntimeValue;
2313}
2314declare class DelegatedPlugin {
2315 constructor(options?: any);
2316 options: any;
2317
2318 /**
2319 * Apply the plugin
2320 */
2321 apply(compiler: Compiler): void;
2322}
2323declare interface DepConstructor {
2324 new (...args: any[]): Dependency;
2325}
2326declare abstract class DependenciesBlock {
2327 dependencies: Dependency[];
2328 blocks: AsyncDependenciesBlock[];
2329
2330 /**
2331 * Adds a DependencyBlock to DependencyBlock relationship.
2332 * This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting)
2333 */
2334 addBlock(block: AsyncDependenciesBlock): void;
2335 addDependency(dependency: Dependency): void;
2336 removeDependency(dependency: Dependency): void;
2337
2338 /**
2339 * Removes all dependencies and blocks
2340 */
2341 clearDependenciesAndBlocks(): void;
2342 updateHash(hash: Hash, context: UpdateHashContextDependency): void;
2343 serialize(__0: { write: any }): void;
2344 deserialize(__0: { read: any }): void;
2345}
2346declare interface DependenciesBlockLike {
2347 dependencies: Dependency[];
2348 blocks: AsyncDependenciesBlock[];
2349}
2350declare class Dependency {
2351 constructor();
2352 weak: boolean;
2353 optional: boolean;
2354 loc: DependencyLocation;
2355 readonly type: string;
2356 readonly category: string;
2357 getResourceIdentifier(): null | string;
2358
2359 /**
2360 * Returns the referenced module and export
2361 */
2362 getReference(moduleGraph: ModuleGraph): never;
2363
2364 /**
2365 * Returns list of exports referenced by this dependency
2366 */
2367 getReferencedExports(
2368 moduleGraph: ModuleGraph,
2369 runtime: RuntimeSpec
2370 ): (string[] | ReferencedExport)[];
2371 getCondition(
2372 moduleGraph: ModuleGraph
2373 ):
2374 | null
2375 | false
2376 | ((arg0: ModuleGraphConnection, arg1: RuntimeSpec) => ConnectionState);
2377
2378 /**
2379 * Returns the exported names
2380 */
2381 getExports(moduleGraph: ModuleGraph): undefined | ExportsSpec;
2382
2383 /**
2384 * Returns warnings
2385 */
2386 getWarnings(moduleGraph: ModuleGraph): WebpackError[];
2387
2388 /**
2389 * Returns errors
2390 */
2391 getErrors(moduleGraph: ModuleGraph): WebpackError[];
2392
2393 /**
2394 * Update the hash
2395 */
2396 updateHash(hash: Hash, context: UpdateHashContextDependency): void;
2397
2398 /**
2399 * implement this method to allow the occurrence order plugin to count correctly
2400 */
2401 getNumberOfIdOccurrences(): number;
2402 getModuleEvaluationSideEffectsState(
2403 moduleGraph: ModuleGraph
2404 ): ConnectionState;
2405 createIgnoredModule(context: string): Module;
2406 serialize(__0: { write: any }): void;
2407 deserialize(__0: { read: any }): void;
2408 module: any;
2409 readonly disconnect: any;
2410 static NO_EXPORTS_REFERENCED: any[];
2411 static EXPORTS_OBJECT_REFERENCED: never[][];
2412}
2413declare interface DependencyConstructor {
2414 new (...args: any[]): Dependency;
2415}
2416type DependencyLocation = SyntheticDependencyLocation | RealDependencyLocation;
2417declare abstract class DependencyTemplate {
2418 apply(
2419 dependency: Dependency,
2420 source: ReplaceSource,
2421 templateContext: DependencyTemplateContext
2422 ): void;
2423}
2424declare interface DependencyTemplateContext {
2425 /**
2426 * the runtime template
2427 */
2428 runtimeTemplate: RuntimeTemplate;
2429
2430 /**
2431 * the dependency templates
2432 */
2433 dependencyTemplates: DependencyTemplates;
2434
2435 /**
2436 * the module graph
2437 */
2438 moduleGraph: ModuleGraph;
2439
2440 /**
2441 * the chunk graph
2442 */
2443 chunkGraph: ChunkGraph;
2444
2445 /**
2446 * the requirements for runtime
2447 */
2448 runtimeRequirements: Set<string>;
2449
2450 /**
2451 * current module
2452 */
2453 module: Module;
2454
2455 /**
2456 * current runtimes, for which code is generated
2457 */
2458 runtime: RuntimeSpec;
2459
2460 /**
2461 * mutable array of init fragments for the current module
2462 */
2463 initFragments: InitFragment[];
2464
2465 /**
2466 * when in a concatenated module, information about other concatenated modules
2467 */
2468 concatenationScope?: ConcatenationScope;
2469}
2470declare abstract class DependencyTemplates {
2471 get(dependency: DependencyConstructor): DependencyTemplate;
2472 set(
2473 dependency: DependencyConstructor,
2474 dependencyTemplate: DependencyTemplate
2475 ): void;
2476 updateHash(part: string): void;
2477 getHash(): string;
2478 clone(): DependencyTemplates;
2479}
2480declare class DeterministicChunkIdsPlugin {
2481 constructor(options?: any);
2482 options: any;
2483
2484 /**
2485 * Apply the plugin
2486 */
2487 apply(compiler: Compiler): void;
2488}
2489declare class DeterministicModuleIdsPlugin {
2490 constructor(options?: any);
2491 options: any;
2492
2493 /**
2494 * Apply the plugin
2495 */
2496 apply(compiler: Compiler): void;
2497}
2498
2499/**
2500 * Options for the webpack-dev-server.
2501 */
2502declare interface DevServer {
2503 [index: string]: any;
2504}
2505declare class DllPlugin {
2506 constructor(options: DllPluginOptions);
2507 options: {
2508 entryOnly: boolean;
2509 /**
2510 * Context of requests in the manifest file (defaults to the webpack context).
2511 */
2512 context?: string;
2513 /**
2514 * If true, manifest json file (output) will be formatted.
2515 */
2516 format?: boolean;
2517 /**
2518 * Name of the exposed dll function (external name, use value of 'output.library').
2519 */
2520 name?: string;
2521 /**
2522 * Absolute path to the manifest json file (output).
2523 */
2524 path: string;
2525 /**
2526 * Type of the dll bundle (external type, use value of 'output.libraryTarget').
2527 */
2528 type?: string;
2529 };
2530
2531 /**
2532 * Apply the plugin
2533 */
2534 apply(compiler: Compiler): void;
2535}
2536declare interface DllPluginOptions {
2537 /**
2538 * Context of requests in the manifest file (defaults to the webpack context).
2539 */
2540 context?: string;
2541
2542 /**
2543 * If true, only entry points will be exposed (default: true).
2544 */
2545 entryOnly?: boolean;
2546
2547 /**
2548 * If true, manifest json file (output) will be formatted.
2549 */
2550 format?: boolean;
2551
2552 /**
2553 * Name of the exposed dll function (external name, use value of 'output.library').
2554 */
2555 name?: string;
2556
2557 /**
2558 * Absolute path to the manifest json file (output).
2559 */
2560 path: string;
2561
2562 /**
2563 * Type of the dll bundle (external type, use value of 'output.libraryTarget').
2564 */
2565 type?: string;
2566}
2567declare class DllReferencePlugin {
2568 constructor(options: DllReferencePluginOptions);
2569 options: DllReferencePluginOptions;
2570 apply(compiler?: any): void;
2571}
2572type DllReferencePluginOptions =
2573 | {
2574 /**
2575 * Context of requests in the manifest (or content property) as absolute path.
2576 */
2577 context?: string;
2578 /**
2579 * Extensions used to resolve modules in the dll bundle (only used when using 'scope').
2580 */
2581 extensions?: string[];
2582 /**
2583 * An object containing content and name or a string to the absolute path of the JSON manifest to be loaded upon compilation.
2584 */
2585 manifest: string | DllReferencePluginOptionsManifest;
2586 /**
2587 * The name where the dll is exposed (external name, defaults to manifest.name).
2588 */
2589 name?: string;
2590 /**
2591 * Prefix which is used for accessing the content of the dll.
2592 */
2593 scope?: string;
2594 /**
2595 * How the dll is exposed (libraryTarget, defaults to manifest.type).
2596 */
2597 sourceType?:
2598 | "var"
2599 | "assign"
2600 | "this"
2601 | "window"
2602 | "global"
2603 | "commonjs"
2604 | "commonjs2"
2605 | "commonjs-module"
2606 | "amd"
2607 | "amd-require"
2608 | "umd"
2609 | "umd2"
2610 | "jsonp"
2611 | "system";
2612 /**
2613 * The way how the export of the dll bundle is used.
2614 */
2615 type?: "object" | "require";
2616 }
2617 | {
2618 /**
2619 * The mappings from request to module info.
2620 */
2621 content: DllReferencePluginOptionsContent;
2622 /**
2623 * Context of requests in the manifest (or content property) as absolute path.
2624 */
2625 context?: string;
2626 /**
2627 * Extensions used to resolve modules in the dll bundle (only used when using 'scope').
2628 */
2629 extensions?: string[];
2630 /**
2631 * The name where the dll is exposed (external name).
2632 */
2633 name: string;
2634 /**
2635 * Prefix which is used for accessing the content of the dll.
2636 */
2637 scope?: string;
2638 /**
2639 * How the dll is exposed (libraryTarget).
2640 */
2641 sourceType?:
2642 | "var"
2643 | "assign"
2644 | "this"
2645 | "window"
2646 | "global"
2647 | "commonjs"
2648 | "commonjs2"
2649 | "commonjs-module"
2650 | "amd"
2651 | "amd-require"
2652 | "umd"
2653 | "umd2"
2654 | "jsonp"
2655 | "system";
2656 /**
2657 * The way how the export of the dll bundle is used.
2658 */
2659 type?: "object" | "require";
2660 };
2661
2662/**
2663 * The mappings from request to module info.
2664 */
2665declare interface DllReferencePluginOptionsContent {
2666 [index: string]: {
2667 /**
2668 * Meta information about the module.
2669 */
2670 buildMeta?: { [index: string]: any };
2671 /**
2672 * Information about the provided exports of the module.
2673 */
2674 exports?: true | string[];
2675 /**
2676 * Module ID.
2677 */
2678 id: string | number;
2679 };
2680}
2681
2682/**
2683 * An object containing content, name and type.
2684 */
2685declare interface DllReferencePluginOptionsManifest {
2686 /**
2687 * The mappings from request to module info.
2688 */
2689 content: DllReferencePluginOptionsContent;
2690
2691 /**
2692 * The name where the dll is exposed (external name).
2693 */
2694 name?: string;
2695
2696 /**
2697 * The type how the dll is exposed (external type).
2698 */
2699 type?:
2700 | "var"
2701 | "assign"
2702 | "this"
2703 | "window"
2704 | "global"
2705 | "commonjs"
2706 | "commonjs2"
2707 | "commonjs-module"
2708 | "amd"
2709 | "amd-require"
2710 | "umd"
2711 | "umd2"
2712 | "jsonp"
2713 | "system";
2714}
2715declare class DynamicEntryPlugin {
2716 constructor(context: string, entry: () => Promise<EntryStaticNormalized>);
2717 context: string;
2718 entry: () => Promise<EntryStaticNormalized>;
2719
2720 /**
2721 * Apply the plugin
2722 */
2723 apply(compiler: Compiler): void;
2724}
2725declare interface Effect {
2726 type: string;
2727 value: any;
2728}
2729declare class ElectronTargetPlugin {
2730 constructor(context?: "main" | "preload" | "renderer");
2731
2732 /**
2733 * Apply the plugin
2734 */
2735 apply(compiler: Compiler): void;
2736}
2737
2738/**
2739 * No generator options are supported for this module type.
2740 */
2741declare interface EmptyGeneratorOptions {}
2742
2743/**
2744 * No parser options are supported for this module type.
2745 */
2746declare interface EmptyParserOptions {}
2747declare class EnableChunkLoadingPlugin {
2748 constructor(type: string);
2749 type: string;
2750
2751 /**
2752 * Apply the plugin
2753 */
2754 apply(compiler: Compiler): void;
2755 static setEnabled(compiler: Compiler, type: string): void;
2756 static checkEnabled(compiler: Compiler, type: string): void;
2757}
2758declare class EnableLibraryPlugin {
2759 constructor(type: string);
2760 type: string;
2761
2762 /**
2763 * Apply the plugin
2764 */
2765 apply(compiler: Compiler): void;
2766 static setEnabled(compiler: Compiler, type: string): void;
2767 static checkEnabled(compiler: Compiler, type: string): void;
2768}
2769type Entry =
2770 | string
2771 | (() => string | EntryObject | string[] | Promise<EntryStatic>)
2772 | EntryObject
2773 | string[];
2774declare interface EntryData {
2775 /**
2776 * dependencies of the entrypoint that should be evaluated at startup
2777 */
2778 dependencies: Dependency[];
2779
2780 /**
2781 * dependencies of the entrypoint that should be included but not evaluated
2782 */
2783 includeDependencies: Dependency[];
2784
2785 /**
2786 * options of the entrypoint
2787 */
2788 options: EntryOptions;
2789}
2790declare abstract class EntryDependency extends ModuleDependency {}
2791
2792/**
2793 * An object with entry point description.
2794 */
2795declare interface EntryDescription {
2796 /**
2797 * The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
2798 */
2799 chunkLoading?: string | false;
2800
2801 /**
2802 * The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.
2803 */
2804 dependOn?: string | string[];
2805
2806 /**
2807 * Specifies the filename of the output file on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
2808 */
2809 filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
2810
2811 /**
2812 * Module(s) that are loaded upon startup.
2813 */
2814 import: EntryItem;
2815
2816 /**
2817 * Specifies the layer in which modules of this entrypoint are placed.
2818 */
2819 layer?: null | string;
2820
2821 /**
2822 * Options for library.
2823 */
2824 library?: LibraryOptions;
2825
2826 /**
2827 * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
2828 */
2829 runtime?: string;
2830
2831 /**
2832 * The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
2833 */
2834 wasmLoading?: string | false;
2835}
2836
2837/**
2838 * An object with entry point description.
2839 */
2840declare interface EntryDescriptionNormalized {
2841 /**
2842 * The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
2843 */
2844 chunkLoading?: string | false;
2845
2846 /**
2847 * The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.
2848 */
2849 dependOn?: string[];
2850
2851 /**
2852 * Specifies the filename of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
2853 */
2854 filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
2855
2856 /**
2857 * Module(s) that are loaded upon startup. The last one is exported.
2858 */
2859 import?: string[];
2860
2861 /**
2862 * Specifies the layer in which modules of this entrypoint are placed.
2863 */
2864 layer?: null | string;
2865
2866 /**
2867 * Options for library.
2868 */
2869 library?: LibraryOptions;
2870
2871 /**
2872 * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
2873 */
2874 runtime?: string;
2875
2876 /**
2877 * The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
2878 */
2879 wasmLoading?: string | false;
2880}
2881type EntryItem = string | string[];
2882type EntryNormalized =
2883 | (() => Promise<EntryStaticNormalized>)
2884 | EntryStaticNormalized;
2885
2886/**
2887 * Multiple entry bundles are created. The key is the entry name. The value can be a string, an array or an entry description object.
2888 */
2889declare interface EntryObject {
2890 [index: string]: string | string[] | EntryDescription;
2891}
2892declare class EntryOptionPlugin {
2893 constructor();
2894 apply(compiler: Compiler): void;
2895 static applyEntryOption(
2896 compiler: Compiler,
2897 context: string,
2898 entry: EntryNormalized
2899 ): void;
2900 static entryDescriptionToOptions(
2901 compiler: Compiler,
2902 name: string,
2903 desc: EntryDescriptionNormalized
2904 ): EntryOptions;
2905}
2906type EntryOptions = { name?: string } & Omit<
2907 EntryDescriptionNormalized,
2908 "import"
2909>;
2910declare class EntryPlugin {
2911 /**
2912 * An entry plugin which will handle
2913 * creation of the EntryDependency
2914 */
2915 constructor(context: string, entry: string, options: string | EntryOptions);
2916 context: string;
2917 entry: string;
2918 options: string | EntryOptions;
2919
2920 /**
2921 * Apply the plugin
2922 */
2923 apply(compiler: Compiler): void;
2924 static createDependency(
2925 entry: string,
2926 options: string | EntryOptions
2927 ): EntryDependency;
2928}
2929type EntryStatic = string | EntryObject | string[];
2930
2931/**
2932 * Multiple entry bundles are created. The key is the entry name. The value is an entry description object.
2933 */
2934declare interface EntryStaticNormalized {
2935 [index: string]: EntryDescriptionNormalized;
2936}
2937declare abstract class Entrypoint extends ChunkGroup {
2938 /**
2939 * Sets the runtimeChunk for an entrypoint.
2940 */
2941 setRuntimeChunk(chunk: Chunk): void;
2942
2943 /**
2944 * Fetches the chunk reference containing the webpack bootstrap code
2945 */
2946 getRuntimeChunk(): null | Chunk;
2947
2948 /**
2949 * Sets the chunk with the entrypoint modules for an entrypoint.
2950 */
2951 setEntrypointChunk(chunk: Chunk): void;
2952
2953 /**
2954 * Returns the chunk which contains the entrypoint modules
2955 * (or at least the execution of them)
2956 */
2957 getEntrypointChunk(): Chunk;
2958}
2959
2960/**
2961 * The abilities of the environment where the webpack generated code should run.
2962 */
2963declare interface Environment {
2964 /**
2965 * The environment supports arrow functions ('() => { ... }').
2966 */
2967 arrowFunction?: boolean;
2968
2969 /**
2970 * The environment supports BigInt as literal (123n).
2971 */
2972 bigIntLiteral?: boolean;
2973
2974 /**
2975 * The environment supports const and let for variable declarations.
2976 */
2977 const?: boolean;
2978
2979 /**
2980 * The environment supports destructuring ('{ a, b } = obj').
2981 */
2982 destructuring?: boolean;
2983
2984 /**
2985 * The environment supports an async import() function to import EcmaScript modules.
2986 */
2987 dynamicImport?: boolean;
2988
2989 /**
2990 * The environment supports 'for of' iteration ('for (const x of array) { ... }').
2991 */
2992 forOf?: boolean;
2993
2994 /**
2995 * The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').
2996 */
2997 module?: boolean;
2998}
2999declare class EnvironmentPlugin {
3000 constructor(...keys: any[]);
3001 keys: any[];
3002 defaultValues: any;
3003
3004 /**
3005 * Apply the plugin
3006 */
3007 apply(compiler: Compiler): void;
3008}
3009declare interface Etag {
3010 toString: () => string;
3011}
3012declare class EvalDevToolModulePlugin {
3013 constructor(options?: any);
3014 namespace: any;
3015 sourceUrlComment: any;
3016 moduleFilenameTemplate: any;
3017
3018 /**
3019 * Apply the plugin
3020 */
3021 apply(compiler: Compiler): void;
3022}
3023declare class EvalSourceMapDevToolPlugin {
3024 constructor(inputOptions: string | SourceMapDevToolPluginOptions);
3025 sourceMapComment: string;
3026 moduleFilenameTemplate: string | Function;
3027 namespace: string;
3028 options: SourceMapDevToolPluginOptions;
3029
3030 /**
3031 * Apply the plugin
3032 */
3033 apply(compiler: Compiler): void;
3034}
3035
3036/**
3037 * Enables/Disables experiments (experimental features with relax SemVer compatibility).
3038 */
3039declare interface Experiments {
3040 /**
3041 * Allow module type 'asset' to generate assets.
3042 */
3043 asset?: boolean;
3044
3045 /**
3046 * Support WebAssembly as asynchronous EcmaScript Module.
3047 */
3048 asyncWebAssembly?: boolean;
3049
3050 /**
3051 * Enable module and chunk layers.
3052 */
3053 layers?: boolean;
3054
3055 /**
3056 * Compile entrypoints and import()s only when they are accessed.
3057 */
3058 lazyCompilation?:
3059 | boolean
3060 | {
3061 /**
3062 * A custom backend.
3063 */
3064 backend?:
3065 | ((
3066 compiler: Compiler,
3067 client: string,
3068 callback: (err?: Error, api?: any) => void
3069 ) => void)
3070 | ((compiler: Compiler, client: string) => Promise<any>);
3071 /**
3072 * A custom client.
3073 */
3074 client?: string;
3075 /**
3076 * Enable/disable lazy compilation for entries.
3077 */
3078 entries?: boolean;
3079 /**
3080 * Enable/disable lazy compilation for import() modules.
3081 */
3082 imports?: boolean;
3083 /**
3084 * Specify which entrypoints or import()ed modules should be lazily compiled. This is matched with the imported module and not the entrypoint name.
3085 */
3086 test?: string | RegExp | ((module: Module) => boolean);
3087 };
3088
3089 /**
3090 * Allow output javascript files as module source type.
3091 */
3092 outputModule?: boolean;
3093
3094 /**
3095 * Support WebAssembly as synchronous EcmaScript Module (outdated).
3096 */
3097 syncWebAssembly?: boolean;
3098
3099 /**
3100 * Allow using top-level-await in EcmaScript Modules.
3101 */
3102 topLevelAwait?: boolean;
3103}
3104declare abstract class ExportInfo {
3105 name: string;
3106
3107 /**
3108 * true: it is provided
3109 * false: it is not provided
3110 * null: only the runtime knows if it is provided
3111 * undefined: it was not determined if it is provided
3112 */
3113 provided?: null | boolean;
3114
3115 /**
3116 * is the export a terminal binding that should be checked for export star conflicts
3117 */
3118 terminalBinding: boolean;
3119
3120 /**
3121 * true: it can be mangled
3122 * false: is can not be mangled
3123 * undefined: it was not determined if it can be mangled
3124 */
3125 canMangleProvide?: boolean;
3126
3127 /**
3128 * true: it can be mangled
3129 * false: is can not be mangled
3130 * undefined: it was not determined if it can be mangled
3131 */
3132 canMangleUse?: boolean;
3133 exportsInfoOwned: boolean;
3134 exportsInfo?: ExportsInfo;
3135 readonly canMangle?: boolean;
3136 setUsedInUnknownWay(runtime: RuntimeSpec): boolean;
3137 setUsedWithoutInfo(runtime: RuntimeSpec): boolean;
3138 setHasUseInfo(): void;
3139 setUsedConditionally(
3140 condition: (arg0: UsageStateType) => boolean,
3141 newValue: UsageStateType,
3142 runtime: RuntimeSpec
3143 ): boolean;
3144 setUsed(newValue: UsageStateType, runtime: RuntimeSpec): boolean;
3145 unsetTarget(key?: any): boolean;
3146 setTarget(
3147 key?: any,
3148 connection?: ModuleGraphConnection,
3149 exportName?: string[]
3150 ): boolean;
3151 getUsed(runtime: RuntimeSpec): UsageStateType;
3152
3153 /**
3154 * get used name
3155 */
3156 getUsedName(
3157 fallbackName: undefined | string,
3158 runtime: RuntimeSpec
3159 ): string | false;
3160 hasUsedName(): boolean;
3161
3162 /**
3163 * Sets the mangled name of this export
3164 */
3165 setUsedName(name: string): void;
3166 getTerminalBinding(
3167 moduleGraph: ModuleGraph,
3168 resolveTargetFilter?: (arg0: {
3169 module: Module;
3170 export?: string[];
3171 }) => boolean
3172 ): undefined | ExportsInfo | ExportInfo;
3173 isReexport(): undefined | boolean;
3174 findTarget(
3175 moduleGraph: ModuleGraph,
3176 validTargetModuleFilter: (arg0: Module) => boolean
3177 ): undefined | false | { module: Module; export?: string[] };
3178 getTarget(
3179 moduleGraph: ModuleGraph,
3180 resolveTargetFilter?: (arg0: {
3181 module: Module;
3182 export?: string[];
3183 }) => boolean
3184 ): undefined | { module: Module; export?: string[] };
3185
3186 /**
3187 * Move the target forward as long resolveTargetFilter is fulfilled
3188 */
3189 moveTarget(
3190 moduleGraph: ModuleGraph,
3191 resolveTargetFilter: (arg0: {
3192 module: Module;
3193 export?: string[];
3194 }) => boolean,
3195 updateOriginalConnection?: (arg0: {
3196 module: Module;
3197 export?: string[];
3198 }) => ModuleGraphConnection
3199 ): undefined | { module: Module; export?: string[] };
3200 createNestedExportsInfo(): undefined | ExportsInfo;
3201 getNestedExportsInfo(): undefined | ExportsInfo;
3202 hasInfo(baseInfo?: any, runtime?: any): boolean;
3203 updateHash(hash?: any, runtime?: any): void;
3204 getUsedInfo(): string;
3205 getProvidedInfo():
3206 | "no provided info"
3207 | "maybe provided (runtime-defined)"
3208 | "provided"
3209 | "not provided";
3210 getRenameInfo():
3211 | string
3212 | "missing provision and use info prevents renaming"
3213 | "usage prevents renaming (no provision info)"
3214 | "missing provision info prevents renaming"
3215 | "missing usage info prevents renaming"
3216 | "usage prevents renaming"
3217 | "could be renamed"
3218 | "provision prevents renaming (no use info)"
3219 | "usage and provision prevents renaming"
3220 | "provision prevents renaming";
3221}
3222declare interface ExportSpec {
3223 /**
3224 * the name of the export
3225 */
3226 name: string;
3227
3228 /**
3229 * can the export be renamed (defaults to true)
3230 */
3231 canMangle?: boolean;
3232
3233 /**
3234 * is the export a terminal binding that should be checked for export star conflicts
3235 */
3236 terminalBinding?: boolean;
3237
3238 /**
3239 * nested exports
3240 */
3241 exports?: (string | ExportSpec)[];
3242
3243 /**
3244 * when reexported: from which module
3245 */
3246 from?: ModuleGraphConnection;
3247
3248 /**
3249 * when reexported: from which export
3250 */
3251 export?: null | string[];
3252
3253 /**
3254 * export is not visible, because another export blends over it
3255 */
3256 hidden?: boolean;
3257}
3258type ExportedVariableInfo = string | ScopeInfo | VariableInfo;
3259declare abstract class ExportsInfo {
3260 readonly ownedExports: Iterable<ExportInfo>;
3261 readonly orderedOwnedExports: Iterable<ExportInfo>;
3262 readonly exports: Iterable<ExportInfo>;
3263 readonly orderedExports: Iterable<ExportInfo>;
3264 readonly otherExportsInfo: ExportInfo;
3265 setRedirectNamedTo(exportsInfo?: any): boolean;
3266 setHasProvideInfo(): void;
3267 setHasUseInfo(): void;
3268 getOwnExportInfo(name: string): ExportInfo;
3269 getExportInfo(name: string): ExportInfo;
3270 getReadOnlyExportInfo(name: string): ExportInfo;
3271 getReadOnlyExportInfoRecursive(name: string[]): undefined | ExportInfo;
3272 getNestedExportsInfo(name?: string[]): undefined | ExportsInfo;
3273 setUnknownExportsProvided(
3274 canMangle?: boolean,
3275 excludeExports?: Set<string>,
3276 targetKey?: any,
3277 targetModule?: ModuleGraphConnection
3278 ): boolean;
3279 setUsedInUnknownWay(runtime: RuntimeSpec): boolean;
3280 setUsedWithoutInfo(runtime: RuntimeSpec): boolean;
3281 setAllKnownExportsUsed(runtime: RuntimeSpec): boolean;
3282 setUsedForSideEffectsOnly(runtime: RuntimeSpec): boolean;
3283 isUsed(runtime: RuntimeSpec): boolean;
3284 isModuleUsed(runtime: RuntimeSpec): boolean;
3285 getUsedExports(runtime: RuntimeSpec): null | boolean | SortableSet<string>;
3286 getProvidedExports(): null | true | string[];
3287 getRelevantExports(runtime: RuntimeSpec): ExportInfo[];
3288 isExportProvided(name: string | string[]): undefined | null | boolean;
3289 getUsageKey(runtime: RuntimeSpec): string;
3290 isEquallyUsed(runtimeA: RuntimeSpec, runtimeB: RuntimeSpec): boolean;
3291 getUsed(name: string | string[], runtime: RuntimeSpec): UsageStateType;
3292 getUsedName(
3293 name: string | string[],
3294 runtime: RuntimeSpec
3295 ): string | false | string[];
3296 updateHash(hash: Hash, runtime: RuntimeSpec): void;
3297 getRestoreProvidedData(): any;
3298 restoreProvided(__0: {
3299 otherProvided: any;
3300 otherCanMangleProvide: any;
3301 otherTerminalBinding: any;
3302 exports: any;
3303 }): void;
3304}
3305declare interface ExportsSpec {
3306 /**
3307 * exported names, true for unknown exports or null for no exports
3308 */
3309 exports: null | true | (string | ExportSpec)[];
3310
3311 /**
3312 * when exports = true, list of unaffected exports
3313 */
3314 excludeExports?: Set<string>;
3315
3316 /**
3317 * list of maybe prior exposed, but now hidden exports
3318 */
3319 hideExports?: Set<string>;
3320
3321 /**
3322 * when reexported: from which module
3323 */
3324 from?: ModuleGraphConnection;
3325
3326 /**
3327 * can the export be renamed (defaults to true)
3328 */
3329 canMangle?: boolean;
3330
3331 /**
3332 * are the exports terminal bindings that should be checked for export star conflicts
3333 */
3334 terminalBinding?: boolean;
3335
3336 /**
3337 * module on which the result depends on
3338 */
3339 dependencies?: Module[];
3340}
3341type Exposes = (string | ExposesObject)[] | ExposesObject;
3342
3343/**
3344 * Advanced configuration for modules that should be exposed by this container.
3345 */
3346declare interface ExposesConfig {
3347 /**
3348 * Request to a module that should be exposed by this container.
3349 */
3350 import: string | string[];
3351
3352 /**
3353 * Custom chunk name for the exposed module.
3354 */
3355 name?: string;
3356}
3357
3358/**
3359 * Modules that should be exposed by this container. Property names are used as public paths.
3360 */
3361declare interface ExposesObject {
3362 [index: string]: string | ExposesConfig | string[];
3363}
3364type Expression =
3365 | UnaryExpression
3366 | ThisExpression
3367 | ArrayExpression
3368 | ObjectExpression
3369 | FunctionExpression
3370 | ArrowFunctionExpression
3371 | YieldExpression
3372 | SimpleLiteral
3373 | RegExpLiteral
3374 | UpdateExpression
3375 | BinaryExpression
3376 | AssignmentExpression
3377 | LogicalExpression
3378 | MemberExpression
3379 | ConditionalExpression
3380 | SimpleCallExpression
3381 | NewExpression
3382 | SequenceExpression
3383 | TemplateLiteral
3384 | TaggedTemplateExpression
3385 | ClassExpression
3386 | MetaProperty
3387 | Identifier
3388 | AwaitExpression
3389 | ImportExpression
3390 | ChainExpression;
3391declare interface ExpressionExpressionInfo {
3392 type: "expression";
3393 rootInfo: string | VariableInfo;
3394 name: string;
3395 getMembers: () => string[];
3396}
3397type ExternalItem =
3398 | string
3399 | RegExp
3400 | (ExternalItemObjectKnown & ExternalItemObjectUnknown)
3401 | ((
3402 data: ExternalItemFunctionData,
3403 callback: (
3404 err?: Error,
3405 result?: string | boolean | string[] | { [index: string]: any }
3406 ) => void
3407 ) => void)
3408 | ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
3409
3410/**
3411 * Data object passed as argument when a function is set for 'externals'.
3412 */
3413declare interface ExternalItemFunctionData {
3414 /**
3415 * The directory in which the request is placed.
3416 */
3417 context?: string;
3418
3419 /**
3420 * Contextual information.
3421 */
3422 contextInfo?: ModuleFactoryCreateDataContextInfo;
3423
3424 /**
3425 * Get a resolve function with the current resolver options.
3426 */
3427 getResolve?: (
3428 options?: ResolveOptionsWebpackOptions
3429 ) =>
3430 | ((
3431 context: string,
3432 request: string,
3433 callback: (err?: Error, result?: string) => void
3434 ) => void)
3435 | ((context: string, request: string) => Promise<string>);
3436
3437 /**
3438 * The request as written by the user in the require/import expression/statement.
3439 */
3440 request?: string;
3441}
3442
3443/**
3444 * If an dependency matches exactly a property of the object, the property value is used as dependency.
3445 */
3446declare interface ExternalItemObjectKnown {
3447 /**
3448 * Specify externals depending on the layer.
3449 */
3450 byLayer?:
3451 | { [index: string]: ExternalItem }
3452 | ((layer: null | string) => ExternalItem);
3453}
3454
3455/**
3456 * If an dependency matches exactly a property of the object, the property value is used as dependency.
3457 */
3458declare interface ExternalItemObjectUnknown {
3459 [index: string]: ExternalItemValue;
3460}
3461type ExternalItemValue = string | boolean | string[] | { [index: string]: any };
3462declare class ExternalModule extends Module {
3463 constructor(request?: any, type?: any, userRequest?: any);
3464 request: string | string[] | Record<string, string | string[]>;
3465 externalType: string;
3466 userRequest: string;
3467 getSourceData(
3468 runtimeTemplate?: any,
3469 moduleGraph?: any,
3470 chunkGraph?: any
3471 ): SourceData;
3472}
3473declare interface ExternalModuleInfo {
3474 index: number;
3475 module: Module;
3476}
3477type Externals =
3478 | string
3479 | RegExp
3480 | ExternalItem[]
3481 | (ExternalItemObjectKnown & ExternalItemObjectUnknown)
3482 | ((
3483 data: ExternalItemFunctionData,
3484 callback: (
3485 err?: Error,
3486 result?: string | boolean | string[] | { [index: string]: any }
3487 ) => void
3488 ) => void)
3489 | ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
3490declare class ExternalsPlugin {
3491 constructor(type: undefined | string, externals: Externals);
3492 type?: string;
3493 externals: Externals;
3494
3495 /**
3496 * Apply the plugin
3497 */
3498 apply(compiler: Compiler): void;
3499}
3500
3501/**
3502 * Enable presets of externals for specific targets.
3503 */
3504declare interface ExternalsPresets {
3505 /**
3506 * Treat common electron built-in modules in main and preload context like 'electron', 'ipc' or 'shell' as external and load them via require() when used.
3507 */
3508 electron?: boolean;
3509
3510 /**
3511 * Treat electron built-in modules in the main context like 'app', 'ipc-main' or 'shell' as external and load them via require() when used.
3512 */
3513 electronMain?: boolean;
3514
3515 /**
3516 * Treat electron built-in modules in the preload context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.
3517 */
3518 electronPreload?: boolean;
3519
3520 /**
3521 * Treat electron built-in modules in the renderer context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.
3522 */
3523 electronRenderer?: boolean;
3524
3525 /**
3526 * Treat node.js built-in modules like fs, path or vm as external and load them via require() when used.
3527 */
3528 node?: boolean;
3529
3530 /**
3531 * Treat NW.js legacy nw.gui module as external and load it via require() when used.
3532 */
3533 nwjs?: boolean;
3534
3535 /**
3536 * Treat references to 'http(s)://...' and 'std:...' as external and load them via import when used (Note that this changes execution order as externals are executed before any other code in the chunk).
3537 */
3538 web?: boolean;
3539
3540 /**
3541 * Treat references to 'http(s)://...' and 'std:...' as external and load them via async import() when used (Note that this external type is an async module, which has various effects on the execution).
3542 */
3543 webAsync?: boolean;
3544}
3545type ExternalsType =
3546 | "var"
3547 | "module"
3548 | "assign"
3549 | "this"
3550 | "window"
3551 | "self"
3552 | "global"
3553 | "commonjs"
3554 | "commonjs2"
3555 | "commonjs-module"
3556 | "amd"
3557 | "amd-require"
3558 | "umd"
3559 | "umd2"
3560 | "jsonp"
3561 | "system"
3562 | "promise"
3563 | "import"
3564 | "script";
3565declare interface FactorizeModuleOptions {
3566 currentProfile: ModuleProfile;
3567 factory: ModuleFactory;
3568 dependencies: Dependency[];
3569 originModule: null | Module;
3570 contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>;
3571 context?: string;
3572}
3573type FakeHook<T> = T & FakeHookMarker;
3574declare interface FakeHookMarker {}
3575declare interface FallbackCacheGroup {
3576 minSize: SplitChunksSizes;
3577 maxAsyncSize: SplitChunksSizes;
3578 maxInitialSize: SplitChunksSizes;
3579 automaticNameDelimiter: string;
3580}
3581declare class FetchCompileAsyncWasmPlugin {
3582 constructor();
3583
3584 /**
3585 * Apply the plugin
3586 */
3587 apply(compiler: Compiler): void;
3588}
3589declare class FetchCompileWasmPlugin {
3590 constructor(options?: any);
3591 options: any;
3592
3593 /**
3594 * Apply the plugin
3595 */
3596 apply(compiler: Compiler): void;
3597}
3598
3599/**
3600 * Options object for persistent file-based caching.
3601 */
3602declare interface FileCacheOptions {
3603 /**
3604 * Dependencies the build depends on (in multiple categories, default categories: 'defaultWebpack').
3605 */
3606 buildDependencies?: { [index: string]: string[] };
3607
3608 /**
3609 * Base directory for the cache (defaults to node_modules/.cache/webpack).
3610 */
3611 cacheDirectory?: string;
3612
3613 /**
3614 * Locations for the cache (defaults to cacheDirectory / name).
3615 */
3616 cacheLocation?: string;
3617
3618 /**
3619 * Algorithm used for generation the hash (see node.js crypto package).
3620 */
3621 hashAlgorithm?: string;
3622
3623 /**
3624 * Time in ms after which idle period the cache storing should happen (only for store: 'pack' or 'idle').
3625 */
3626 idleTimeout?: number;
3627
3628 /**
3629 * Time in ms after which idle period the initial cache storing should happen (only for store: 'pack' or 'idle').
3630 */
3631 idleTimeoutForInitialStore?: number;
3632
3633 /**
3634 * List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.
3635 */
3636 immutablePaths?: string[];
3637
3638 /**
3639 * List of paths that are managed by a package manager and can be trusted to not be modified otherwise.
3640 */
3641 managedPaths?: string[];
3642
3643 /**
3644 * Name for the cache. Different names will lead to different coexisting caches.
3645 */
3646 name?: string;
3647
3648 /**
3649 * When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).
3650 */
3651 store?: "pack";
3652
3653 /**
3654 * Filesystem caching.
3655 */
3656 type: "filesystem";
3657
3658 /**
3659 * Version of the cache data. Different versions won't allow to reuse the cache and override existing content. Update the version when config changed in a way which doesn't allow to reuse cache. This will invalidate the cache.
3660 */
3661 version?: string;
3662}
3663declare interface FileSystem {
3664 readFile: {
3665 (arg0: string, arg1: FileSystemCallback<string | Buffer>): void;
3666 (
3667 arg0: string,
3668 arg1: object,
3669 arg2: FileSystemCallback<string | Buffer>
3670 ): void;
3671 };
3672 readdir: {
3673 (
3674 arg0: string,
3675 arg1: FileSystemCallback<(string | Buffer)[] | FileSystemDirent[]>
3676 ): void;
3677 (
3678 arg0: string,
3679 arg1: object,
3680 arg2: FileSystemCallback<(string | Buffer)[] | FileSystemDirent[]>
3681 ): void;
3682 };
3683 readJson?: {
3684 (arg0: string, arg1: FileSystemCallback<object>): void;
3685 (arg0: string, arg1: object, arg2: FileSystemCallback<object>): void;
3686 };
3687 readlink: {
3688 (arg0: string, arg1: FileSystemCallback<string | Buffer>): void;
3689 (
3690 arg0: string,
3691 arg1: object,
3692 arg2: FileSystemCallback<string | Buffer>
3693 ): void;
3694 };
3695 lstat?: {
3696 (arg0: string, arg1: FileSystemCallback<FileSystemStats>): void;
3697 (
3698 arg0: string,
3699 arg1: object,
3700 arg2: FileSystemCallback<string | Buffer>
3701 ): void;
3702 };
3703 stat: {
3704 (arg0: string, arg1: FileSystemCallback<FileSystemStats>): void;
3705 (
3706 arg0: string,
3707 arg1: object,
3708 arg2: FileSystemCallback<string | Buffer>
3709 ): void;
3710 };
3711}
3712declare interface FileSystemCallback<T> {
3713 (err?: null | (PossibleFileSystemError & Error), result?: T): any;
3714}
3715declare interface FileSystemDirent {
3716 name: string | Buffer;
3717 isDirectory: () => boolean;
3718 isFile: () => boolean;
3719}
3720declare abstract class FileSystemInfo {
3721 fs: InputFileSystem;
3722 logger?: WebpackLogger;
3723 fileTimestampQueue: AsyncQueue<string, string, null | FileSystemInfoEntry>;
3724 fileHashQueue: AsyncQueue<string, string, null | string>;
3725 contextTimestampQueue: AsyncQueue<string, string, null | FileSystemInfoEntry>;
3726 contextHashQueue: AsyncQueue<string, string, null | string>;
3727 managedItemQueue: AsyncQueue<string, string, null | string>;
3728 managedItemDirectoryQueue: AsyncQueue<string, string, Set<string>>;
3729 managedPaths: string[];
3730 managedPathsWithSlash: string[];
3731 immutablePaths: string[];
3732 immutablePathsWithSlash: string[];
3733 logStatistics(): void;
3734 addFileTimestamps(
3735 map: Map<string, null | FileSystemInfoEntry | "ignore">
3736 ): void;
3737 addContextTimestamps(
3738 map: Map<string, null | FileSystemInfoEntry | "ignore">
3739 ): void;
3740 getFileTimestamp(
3741 path: string,
3742 callback: (
3743 arg0?: WebpackError,
3744 arg1?: null | FileSystemInfoEntry | "ignore"
3745 ) => void
3746 ): void;
3747 getContextTimestamp(
3748 path: string,
3749 callback: (
3750 arg0?: WebpackError,
3751 arg1?: null | FileSystemInfoEntry | "ignore"
3752 ) => void
3753 ): void;
3754 getFileHash(
3755 path: string,
3756 callback: (arg0?: WebpackError, arg1?: string) => void
3757 ): void;
3758 getContextHash(
3759 path: string,
3760 callback: (arg0?: WebpackError, arg1?: string) => void
3761 ): void;
3762 resolveBuildDependencies(
3763 context: string,
3764 deps: Iterable<string>,
3765 callback: (arg0?: Error, arg1?: ResolveBuildDependenciesResult) => void
3766 ): void;
3767 checkResolveResultsValid(
3768 resolveResults: Map<string, string>,
3769 callback: (arg0?: Error, arg1?: boolean) => void
3770 ): void;
3771 createSnapshot(
3772 startTime: number,
3773 files: Iterable<string>,
3774 directories: Iterable<string>,
3775 missing: Iterable<string>,
3776 options: {
3777 /**
3778 * Use hashes of the content of the files/directories to determine invalidation.
3779 */
3780 hash?: boolean;
3781 /**
3782 * Use timestamps of the files/directories to determine invalidation.
3783 */
3784 timestamp?: boolean;
3785 },
3786 callback: (arg0?: WebpackError, arg1?: Snapshot) => void
3787 ): void;
3788 mergeSnapshots(snapshot1: Snapshot, snapshot2: Snapshot): Snapshot;
3789 checkSnapshotValid(
3790 snapshot: Snapshot,
3791 callback: (arg0?: WebpackError, arg1?: boolean) => void
3792 ): void;
3793 getDeprecatedFileTimestamps(): Map<any, any>;
3794 getDeprecatedContextTimestamps(): Map<any, any>;
3795}
3796declare interface FileSystemInfoEntry {
3797 safeTime: number;
3798 timestamp?: number;
3799 timestampHash?: string;
3800}
3801declare interface FileSystemStats {
3802 isDirectory: () => boolean;
3803 isFile: () => boolean;
3804}
3805type FilterItemTypes = string | RegExp | ((value: string) => boolean);
3806declare interface GenerateContext {
3807 /**
3808 * mapping from dependencies to templates
3809 */
3810 dependencyTemplates: DependencyTemplates;
3811
3812 /**
3813 * the runtime template
3814 */
3815 runtimeTemplate: RuntimeTemplate;
3816
3817 /**
3818 * the module graph
3819 */
3820 moduleGraph: ModuleGraph;
3821
3822 /**
3823 * the chunk graph
3824 */
3825 chunkGraph: ChunkGraph;
3826
3827 /**
3828 * the requirements for runtime
3829 */
3830 runtimeRequirements: Set<string>;
3831
3832 /**
3833 * the runtime
3834 */
3835 runtime: RuntimeSpec;
3836
3837 /**
3838 * when in concatenated module, information about other concatenated modules
3839 */
3840 concatenationScope?: ConcatenationScope;
3841
3842 /**
3843 * which kind of code should be generated
3844 */
3845 type: string;
3846
3847 /**
3848 * get access to the code generation data
3849 */
3850 getData?: () => Map<string, any>;
3851}
3852declare class Generator {
3853 constructor();
3854 getTypes(module: NormalModule): Set<string>;
3855 getSize(module: NormalModule, type?: string): number;
3856 generate(module: NormalModule, __1: GenerateContext): Source;
3857 getConcatenationBailoutReason(
3858 module: NormalModule,
3859 context: ConcatenationBailoutReasonContext
3860 ): undefined | string;
3861 updateHash(hash: Hash, __1: UpdateHashContextGenerator): void;
3862 static byType(map?: any): ByTypeGenerator;
3863}
3864type GeneratorOptionsByModuleType = GeneratorOptionsByModuleTypeKnown &
3865 GeneratorOptionsByModuleTypeUnknown;
3866
3867/**
3868 * Specify options for each generator.
3869 */
3870declare interface GeneratorOptionsByModuleTypeKnown {
3871 /**
3872 * Generator options for asset modules.
3873 */
3874 asset?: AssetGeneratorOptions;
3875
3876 /**
3877 * Generator options for asset/inline modules.
3878 */
3879 "asset/inline"?: AssetInlineGeneratorOptions;
3880
3881 /**
3882 * Generator options for asset/resource modules.
3883 */
3884 "asset/resource"?: AssetResourceGeneratorOptions;
3885
3886 /**
3887 * No generator options are supported for this module type.
3888 */
3889 javascript?: EmptyGeneratorOptions;
3890
3891 /**
3892 * No generator options are supported for this module type.
3893 */
3894 "javascript/auto"?: EmptyGeneratorOptions;
3895
3896 /**
3897 * No generator options are supported for this module type.
3898 */
3899 "javascript/dynamic"?: EmptyGeneratorOptions;
3900
3901 /**
3902 * No generator options are supported for this module type.
3903 */
3904 "javascript/esm"?: EmptyGeneratorOptions;
3905}
3906
3907/**
3908 * Specify options for each generator.
3909 */
3910declare interface GeneratorOptionsByModuleTypeUnknown {
3911 [index: string]: { [index: string]: any };
3912}
3913declare class GetChunkFilenameRuntimeModule extends RuntimeModule {
3914 constructor(
3915 contentType: string,
3916 name: string,
3917 global: string,
3918 getFilenameForChunk: (
3919 arg0: Chunk
3920 ) => string | ((arg0: PathData, arg1?: AssetInfo) => string),
3921 allChunks: boolean
3922 );
3923 contentType: string;
3924 global: string;
3925 getFilenameForChunk: (
3926 arg0: Chunk
3927 ) => string | ((arg0: PathData, arg1?: AssetInfo) => string);
3928 allChunks: boolean;
3929
3930 /**
3931 * Runtime modules without any dependencies to other runtime modules
3932 */
3933 static STAGE_NORMAL: number;
3934
3935 /**
3936 * Runtime modules with simple dependencies on other runtime modules
3937 */
3938 static STAGE_BASIC: number;
3939
3940 /**
3941 * Runtime modules which attach to handlers of other runtime modules
3942 */
3943 static STAGE_ATTACH: number;
3944
3945 /**
3946 * Runtime modules which trigger actions on bootstrap
3947 */
3948 static STAGE_TRIGGER: number;
3949}
3950declare interface GroupConfig {
3951 getKeys: (arg0?: any) => string[];
3952 createGroup: (arg0: string, arg1: any[], arg2: any[]) => object;
3953 getOptions?: (arg0: string, arg1: any[]) => GroupOptions;
3954}
3955declare interface GroupOptions {
3956 groupChildren?: boolean;
3957 force?: boolean;
3958 targetGroupCount?: number;
3959}
3960declare interface HMRJavascriptParserHooks {
3961 hotAcceptCallback: SyncBailHook<[any, string[]], void>;
3962 hotAcceptWithoutCallback: SyncBailHook<[any, string[]], void>;
3963}
3964declare interface HandleModuleCreationOptions {
3965 factory: ModuleFactory;
3966 dependencies: Dependency[];
3967 originModule: null | Module;
3968 contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>;
3969 context?: string;
3970
3971 /**
3972 * recurse into dependencies of the created module
3973 */
3974 recursive?: boolean;
3975}
3976declare class Hash {
3977 constructor();
3978
3979 /**
3980 * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
3981 */
3982 update(data: string | Buffer, inputEncoding?: string): Hash;
3983
3984 /**
3985 * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
3986 */
3987 digest(encoding?: string): string | Buffer;
3988}
3989declare interface HashableObject {
3990 updateHash: (arg0: Hash) => void;
3991}
3992declare class HashedModuleIdsPlugin {
3993 constructor(options?: HashedModuleIdsPluginOptions);
3994 options: HashedModuleIdsPluginOptions;
3995 apply(compiler?: any): void;
3996}
3997declare interface HashedModuleIdsPluginOptions {
3998 /**
3999 * The context directory for creating names.
4000 */
4001 context?: string;
4002
4003 /**
4004 * The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.
4005 */
4006 hashDigest?: "hex" | "latin1" | "base64";
4007
4008 /**
4009 * The prefix length of the hash digest to use, defaults to 4.
4010 */
4011 hashDigestLength?: number;
4012
4013 /**
4014 * The hashing algorithm to use, defaults to 'md4'. All functions from Node.JS' crypto.createHash are supported.
4015 */
4016 hashFunction?: string;
4017}
4018declare abstract class HelperRuntimeModule extends RuntimeModule {}
4019declare class HotModuleReplacementPlugin {
4020 constructor(options?: any);
4021 options: any;
4022
4023 /**
4024 * Apply the plugin
4025 */
4026 apply(compiler: Compiler): void;
4027 static getParserHooks(parser: JavascriptParser): HMRJavascriptParserHooks;
4028}
4029declare class HotUpdateChunk extends Chunk {
4030 constructor();
4031}
4032declare class HttpUriPlugin {
4033 constructor();
4034
4035 /**
4036 * Apply the plugin
4037 */
4038 apply(compiler: Compiler): void;
4039}
4040declare class HttpsUriPlugin {
4041 constructor();
4042
4043 /**
4044 * Apply the plugin
4045 */
4046 apply(compiler: Compiler): void;
4047}
4048declare interface IDirent {
4049 isFile: () => boolean;
4050 isDirectory: () => boolean;
4051 isBlockDevice: () => boolean;
4052 isCharacterDevice: () => boolean;
4053 isSymbolicLink: () => boolean;
4054 isFIFO: () => boolean;
4055 isSocket: () => boolean;
4056 name: string | Buffer;
4057}
4058declare interface IStats {
4059 isFile: () => boolean;
4060 isDirectory: () => boolean;
4061 isBlockDevice: () => boolean;
4062 isCharacterDevice: () => boolean;
4063 isSymbolicLink: () => boolean;
4064 isFIFO: () => boolean;
4065 isSocket: () => boolean;
4066 dev: number | bigint;
4067 ino: number | bigint;
4068 mode: number | bigint;
4069 nlink: number | bigint;
4070 uid: number | bigint;
4071 gid: number | bigint;
4072 rdev: number | bigint;
4073 size: number | bigint;
4074 blksize: number | bigint;
4075 blocks: number | bigint;
4076 atimeMs: number | bigint;
4077 mtimeMs: number | bigint;
4078 ctimeMs: number | bigint;
4079 birthtimeMs: number | bigint;
4080 atime: Date;
4081 mtime: Date;
4082 ctime: Date;
4083 birthtime: Date;
4084}
4085declare class IgnorePlugin {
4086 constructor(options: IgnorePluginOptions);
4087 options: IgnorePluginOptions;
4088
4089 /**
4090 * Note that if "contextRegExp" is given, both the "resourceRegExp"
4091 * and "contextRegExp" have to match.
4092 */
4093 checkIgnore(resolveData: ResolveData): undefined | false;
4094
4095 /**
4096 * Apply the plugin
4097 */
4098 apply(compiler: Compiler): void;
4099}
4100type IgnorePluginOptions =
4101 | {
4102 /**
4103 * A RegExp to test the context (directory) against.
4104 */
4105 contextRegExp?: RegExp;
4106 /**
4107 * A RegExp to test the request against.
4108 */
4109 resourceRegExp?: RegExp;
4110 }
4111 | {
4112 /**
4113 * A filter function for resource and context.
4114 */
4115 checkResource?: (resource: string, context: string) => boolean;
4116 };
4117type ImportSource = undefined | null | string | SimpleLiteral | RegExpLiteral;
4118
4119/**
4120 * Options for infrastructure level logging.
4121 */
4122declare interface InfrastructureLogging {
4123 /**
4124 * Enable debug logging for specific loggers.
4125 */
4126 debug?:
4127 | string
4128 | boolean
4129 | RegExp
4130 | FilterItemTypes[]
4131 | ((value: string) => boolean);
4132
4133 /**
4134 * Log level.
4135 */
4136 level?: "none" | "verbose" | "error" | "warn" | "info" | "log";
4137}
4138declare abstract class InitFragment {
4139 content: string | Source;
4140 stage: number;
4141 position: number;
4142 key?: string;
4143 endContent?: string | Source;
4144 getContent(generateContext: GenerateContext): string | Source;
4145 getEndContent(generateContext: GenerateContext): undefined | string | Source;
4146 merge: any;
4147}
4148declare interface InputFileSystem {
4149 readFile: (
4150 arg0: string,
4151 arg1: (arg0?: NodeJS.ErrnoException, arg1?: string | Buffer) => void
4152 ) => void;
4153 readJson?: (
4154 arg0: string,
4155 arg1: (arg0?: Error | NodeJS.ErrnoException, arg1?: any) => void
4156 ) => void;
4157 readlink: (
4158 arg0: string,
4159 arg1: (arg0?: NodeJS.ErrnoException, arg1?: string | Buffer) => void
4160 ) => void;
4161 readdir: (
4162 arg0: string,
4163 arg1: (
4164 arg0?: NodeJS.ErrnoException,
4165 arg1?: (string | Buffer)[] | IDirent[]
4166 ) => void
4167 ) => void;
4168 stat: (
4169 arg0: string,
4170 arg1: (arg0?: NodeJS.ErrnoException, arg1?: IStats) => void
4171 ) => void;
4172 realpath?: (
4173 arg0: string,
4174 arg1: (arg0?: NodeJS.ErrnoException, arg1?: string | Buffer) => void
4175 ) => void;
4176 purge?: (arg0?: string) => void;
4177 join?: (arg0: string, arg1: string) => string;
4178 relative?: (arg0: string, arg1: string) => string;
4179 dirname?: (arg0: string) => string;
4180}
4181type IntermediateFileSystem = InputFileSystem &
4182 OutputFileSystem &
4183 IntermediateFileSystemExtras;
4184declare interface IntermediateFileSystemExtras {
4185 mkdirSync: (arg0: string) => void;
4186 createWriteStream: (arg0: string) => NodeJS.WritableStream;
4187 open: (
4188 arg0: string,
4189 arg1: string,
4190 arg2: (arg0?: NodeJS.ErrnoException, arg1?: number) => void
4191 ) => void;
4192 read: (
4193 arg0: number,
4194 arg1: Buffer,
4195 arg2: number,
4196 arg3: number,
4197 arg4: number,
4198 arg5: (arg0?: NodeJS.ErrnoException, arg1?: number) => void
4199 ) => void;
4200 close: (arg0: number, arg1: (arg0?: NodeJS.ErrnoException) => void) => void;
4201 rename: (
4202 arg0: string,
4203 arg1: string,
4204 arg2: (arg0?: NodeJS.ErrnoException) => void
4205 ) => void;
4206}
4207type InternalCell<T> = T | typeof TOMBSTONE | typeof UNDEFINED_MARKER;
4208declare abstract class ItemCacheFacade {
4209 get<T>(callback: CallbackCache<T>): void;
4210 getPromise<T>(): Promise<T>;
4211 store<T>(data: T, callback: CallbackCache<void>): void;
4212 storePromise<T>(data: T): Promise<void>;
4213 provide<T>(
4214 computer: (arg0: CallbackNormalErrorCache<T>) => void,
4215 callback: CallbackNormalErrorCache<T>
4216 ): void;
4217 providePromise<T>(computer: () => T | Promise<T>): Promise<T>;
4218}
4219declare class JavascriptModulesPlugin {
4220 constructor(options?: object);
4221 options: object;
4222
4223 /**
4224 * Apply the plugin
4225 */
4226 apply(compiler: Compiler): void;
4227 renderModule(
4228 module: Module,
4229 renderContext: RenderContextObject,
4230 hooks: CompilationHooksJavascriptModulesPlugin,
4231 factory: boolean | "strict"
4232 ): Source;
4233 renderChunk(
4234 renderContext: RenderContextObject,
4235 hooks: CompilationHooksJavascriptModulesPlugin
4236 ): Source;
4237 renderMain(
4238 renderContext: MainRenderContext,
4239 hooks: CompilationHooksJavascriptModulesPlugin,
4240 compilation: Compilation
4241 ): Source;
4242 updateHashWithBootstrap(
4243 hash: Hash,
4244 renderContext: RenderBootstrapContext,
4245 hooks: CompilationHooksJavascriptModulesPlugin
4246 ): void;
4247 renderBootstrap(
4248 renderContext: RenderBootstrapContext,
4249 hooks: CompilationHooksJavascriptModulesPlugin
4250 ): {
4251 header: string[];
4252 beforeStartup: string[];
4253 startup: string[];
4254 afterStartup: string[];
4255 allowInlineStartup: boolean;
4256 };
4257 renderRequire(
4258 renderContext: RenderBootstrapContext,
4259 hooks: CompilationHooksJavascriptModulesPlugin
4260 ): string;
4261 static getCompilationHooks(
4262 compilation: Compilation
4263 ): CompilationHooksJavascriptModulesPlugin;
4264 static getChunkFilenameTemplate(chunk?: any, outputOptions?: any): any;
4265 static chunkHasJs: (chunk: Chunk, chunkGraph: ChunkGraph) => boolean;
4266}
4267declare class JavascriptParser extends Parser {
4268 constructor(sourceType?: "module" | "script" | "auto");
4269 hooks: Readonly<{
4270 evaluateTypeof: HookMap<
4271 SyncBailHook<
4272 [UnaryExpression],
4273 undefined | null | BasicEvaluatedExpression
4274 >
4275 >;
4276 evaluate: HookMap<
4277 SyncBailHook<[Expression], undefined | null | BasicEvaluatedExpression>
4278 >;
4279 evaluateIdentifier: HookMap<
4280 SyncBailHook<
4281 [ThisExpression | MemberExpression | MetaProperty | Identifier],
4282 undefined | null | BasicEvaluatedExpression
4283 >
4284 >;
4285 evaluateDefinedIdentifier: HookMap<
4286 SyncBailHook<
4287 [ThisExpression | MemberExpression | Identifier],
4288 undefined | null | BasicEvaluatedExpression
4289 >
4290 >;
4291 evaluateCallExpressionMember: HookMap<
4292 SyncBailHook<
4293 [CallExpression, undefined | BasicEvaluatedExpression],
4294 undefined | null | BasicEvaluatedExpression
4295 >
4296 >;
4297 isPure: HookMap<
4298 SyncBailHook<
4299 [
4300 (
4301 | UnaryExpression
4302 | ThisExpression
4303 | ArrayExpression
4304 | ObjectExpression
4305 | FunctionExpression
4306 | ArrowFunctionExpression
4307 | YieldExpression
4308 | SimpleLiteral
4309 | RegExpLiteral
4310 | UpdateExpression
4311 | BinaryExpression
4312 | AssignmentExpression
4313 | LogicalExpression
4314 | MemberExpression
4315 | ConditionalExpression
4316 | SimpleCallExpression
4317 | NewExpression
4318 | SequenceExpression
4319 | TemplateLiteral
4320 | TaggedTemplateExpression
4321 | ClassExpression
4322 | MetaProperty
4323 | Identifier
4324 | AwaitExpression
4325 | ImportExpression
4326 | ChainExpression
4327 | FunctionDeclaration
4328 | VariableDeclaration
4329 | ClassDeclaration
4330 ),
4331 number
4332 ],
4333 boolean | void
4334 >
4335 >;
4336 preStatement: SyncBailHook<
4337 [
4338 | FunctionDeclaration
4339 | VariableDeclaration
4340 | ClassDeclaration
4341 | ExpressionStatement
4342 | BlockStatement
4343 | EmptyStatement
4344 | DebuggerStatement
4345 | WithStatement
4346 | ReturnStatement
4347 | LabeledStatement
4348 | BreakStatement
4349 | ContinueStatement
4350 | IfStatement
4351 | SwitchStatement
4352 | ThrowStatement
4353 | TryStatement
4354 | WhileStatement
4355 | DoWhileStatement
4356 | ForStatement
4357 | ForInStatement
4358 | ForOfStatement
4359 | ImportDeclaration
4360 | ExportNamedDeclaration
4361 | ExportDefaultDeclaration
4362 | ExportAllDeclaration
4363 ],
4364 boolean | void
4365 >;
4366 blockPreStatement: SyncBailHook<
4367 [
4368 | FunctionDeclaration
4369 | VariableDeclaration
4370 | ClassDeclaration
4371 | ExpressionStatement
4372 | BlockStatement
4373 | EmptyStatement
4374 | DebuggerStatement
4375 | WithStatement
4376 | ReturnStatement
4377 | LabeledStatement
4378 | BreakStatement
4379 | ContinueStatement
4380 | IfStatement
4381 | SwitchStatement
4382 | ThrowStatement
4383 | TryStatement
4384 | WhileStatement
4385 | DoWhileStatement
4386 | ForStatement
4387 | ForInStatement
4388 | ForOfStatement
4389 | ImportDeclaration
4390 | ExportNamedDeclaration
4391 | ExportDefaultDeclaration
4392 | ExportAllDeclaration
4393 ],
4394 boolean | void
4395 >;
4396 statement: SyncBailHook<
4397 [
4398 | FunctionDeclaration
4399 | VariableDeclaration
4400 | ClassDeclaration
4401 | ExpressionStatement
4402 | BlockStatement
4403 | EmptyStatement
4404 | DebuggerStatement
4405 | WithStatement
4406 | ReturnStatement
4407 | LabeledStatement
4408 | BreakStatement
4409 | ContinueStatement
4410 | IfStatement
4411 | SwitchStatement
4412 | ThrowStatement
4413 | TryStatement
4414 | WhileStatement
4415 | DoWhileStatement
4416 | ForStatement
4417 | ForInStatement
4418 | ForOfStatement
4419 | ImportDeclaration
4420 | ExportNamedDeclaration
4421 | ExportDefaultDeclaration
4422 | ExportAllDeclaration
4423 ],
4424 boolean | void
4425 >;
4426 statementIf: SyncBailHook<[IfStatement], boolean | void>;
4427 classExtendsExpression: SyncBailHook<
4428 [Expression, ClassExpression | ClassDeclaration],
4429 boolean | void
4430 >;
4431 classBodyElement: SyncBailHook<
4432 [MethodDefinition, ClassExpression | ClassDeclaration],
4433 boolean | void
4434 >;
4435 label: HookMap<SyncBailHook<[LabeledStatement], boolean | void>>;
4436 import: SyncBailHook<[Statement, ImportSource], boolean | void>;
4437 importSpecifier: SyncBailHook<
4438 [Statement, ImportSource, string, string],
4439 boolean | void
4440 >;
4441 export: SyncBailHook<[Statement], boolean | void>;
4442 exportImport: SyncBailHook<[Statement, ImportSource], boolean | void>;
4443 exportDeclaration: SyncBailHook<[Statement, Declaration], boolean | void>;
4444 exportExpression: SyncBailHook<[Statement, Declaration], boolean | void>;
4445 exportSpecifier: SyncBailHook<
4446 [Statement, string, string, undefined | number],
4447 boolean | void
4448 >;
4449 exportImportSpecifier: SyncBailHook<
4450 [Statement, ImportSource, string, string, undefined | number],
4451 boolean | void
4452 >;
4453 preDeclarator: SyncBailHook<
4454 [VariableDeclarator, Statement],
4455 boolean | void
4456 >;
4457 declarator: SyncBailHook<[VariableDeclarator, Statement], boolean | void>;
4458 varDeclaration: HookMap<SyncBailHook<[Declaration], boolean | void>>;
4459 varDeclarationLet: HookMap<SyncBailHook<[Declaration], boolean | void>>;
4460 varDeclarationConst: HookMap<SyncBailHook<[Declaration], boolean | void>>;
4461 varDeclarationVar: HookMap<SyncBailHook<[Declaration], boolean | void>>;
4462 pattern: HookMap<SyncBailHook<[Identifier], boolean | void>>;
4463 canRename: HookMap<SyncBailHook<[Expression], boolean | void>>;
4464 rename: HookMap<SyncBailHook<[Expression], boolean | void>>;
4465 assign: HookMap<SyncBailHook<[AssignmentExpression], boolean | void>>;
4466 assignMemberChain: HookMap<
4467 SyncBailHook<[AssignmentExpression, string[]], boolean | void>
4468 >;
4469 typeof: HookMap<SyncBailHook<[Expression], boolean | void>>;
4470 importCall: SyncBailHook<[Expression], boolean | void>;
4471 topLevelAwait: SyncBailHook<[Expression], boolean | void>;
4472 call: HookMap<SyncBailHook<[Expression], boolean | void>>;
4473 callMemberChain: HookMap<
4474 SyncBailHook<[CallExpression, string[]], boolean | void>
4475 >;
4476 memberChainOfCallMemberChain: HookMap<
4477 SyncBailHook<
4478 [Expression, string[], CallExpression, string[]],
4479 boolean | void
4480 >
4481 >;
4482 callMemberChainOfCallMemberChain: HookMap<
4483 SyncBailHook<
4484 [Expression, string[], CallExpression, string[]],
4485 boolean | void
4486 >
4487 >;
4488 optionalChaining: SyncBailHook<[ChainExpression], boolean | void>;
4489 new: HookMap<SyncBailHook<[NewExpression], boolean | void>>;
4490 expression: HookMap<SyncBailHook<[Expression], boolean | void>>;
4491 expressionMemberChain: HookMap<
4492 SyncBailHook<[Expression, string[]], boolean | void>
4493 >;
4494 unhandledExpressionMemberChain: HookMap<
4495 SyncBailHook<[Expression, string[]], boolean | void>
4496 >;
4497 expressionConditionalOperator: SyncBailHook<[Expression], boolean | void>;
4498 expressionLogicalOperator: SyncBailHook<[Expression], boolean | void>;
4499 program: SyncBailHook<[Program, Comment[]], boolean | void>;
4500 finish: SyncBailHook<[Program, Comment[]], boolean | void>;
4501 }>;
4502 sourceType: "module" | "script" | "auto";
4503 scope: ScopeInfo;
4504 state: ParserState;
4505 comments: any;
4506 semicolons: any;
4507 statementPath: (
4508 | UnaryExpression
4509 | ThisExpression
4510 | ArrayExpression
4511 | ObjectExpression
4512 | FunctionExpression
4513 | ArrowFunctionExpression
4514 | YieldExpression
4515 | SimpleLiteral
4516 | RegExpLiteral
4517 | UpdateExpression
4518 | BinaryExpression
4519 | AssignmentExpression
4520 | LogicalExpression
4521 | MemberExpression
4522 | ConditionalExpression
4523 | SimpleCallExpression
4524 | NewExpression
4525 | SequenceExpression
4526 | TemplateLiteral
4527 | TaggedTemplateExpression
4528 | ClassExpression
4529 | MetaProperty
4530 | Identifier
4531 | AwaitExpression
4532 | ImportExpression
4533 | ChainExpression
4534 | FunctionDeclaration
4535 | VariableDeclaration
4536 | ClassDeclaration
4537 | ExpressionStatement
4538 | BlockStatement
4539 | EmptyStatement
4540 | DebuggerStatement
4541 | WithStatement
4542 | ReturnStatement
4543 | LabeledStatement
4544 | BreakStatement
4545 | ContinueStatement
4546 | IfStatement
4547 | SwitchStatement
4548 | ThrowStatement
4549 | TryStatement
4550 | WhileStatement
4551 | DoWhileStatement
4552 | ForStatement
4553 | ForInStatement
4554 | ForOfStatement
4555 )[];
4556 prevStatement: any;
4557 currentTagData: any;
4558 getRenameIdentifier(expr?: any): undefined | string;
4559 walkClass(classy: ClassExpression | ClassDeclaration): void;
4560 walkMethodDefinition(methodDefinition?: any): void;
4561 preWalkStatements(statements?: any): void;
4562 blockPreWalkStatements(statements?: any): void;
4563 walkStatements(statements?: any): void;
4564 preWalkStatement(statement?: any): void;
4565 blockPreWalkStatement(statement?: any): void;
4566 walkStatement(statement?: any): void;
4567
4568 /**
4569 * Walks a statements that is nested within a parent statement
4570 * and can potentially be a non-block statement.
4571 * This enforces the nested statement to never be in ASI position.
4572 */
4573 walkNestedStatement(statement: Statement): void;
4574 preWalkBlockStatement(statement?: any): void;
4575 walkBlockStatement(statement?: any): void;
4576 walkExpressionStatement(statement?: any): void;
4577 preWalkIfStatement(statement?: any): void;
4578 walkIfStatement(statement?: any): void;
4579 preWalkLabeledStatement(statement?: any): void;
4580 walkLabeledStatement(statement?: any): void;
4581 preWalkWithStatement(statement?: any): void;
4582 walkWithStatement(statement?: any): void;
4583 preWalkSwitchStatement(statement?: any): void;
4584 walkSwitchStatement(statement?: any): void;
4585 walkTerminatingStatement(statement?: any): void;
4586 walkReturnStatement(statement?: any): void;
4587 walkThrowStatement(statement?: any): void;
4588 preWalkTryStatement(statement?: any): void;
4589 walkTryStatement(statement?: any): void;
4590 preWalkWhileStatement(statement?: any): void;
4591 walkWhileStatement(statement?: any): void;
4592 preWalkDoWhileStatement(statement?: any): void;
4593 walkDoWhileStatement(statement?: any): void;
4594 preWalkForStatement(statement?: any): void;
4595 walkForStatement(statement?: any): void;
4596 preWalkForInStatement(statement?: any): void;
4597 walkForInStatement(statement?: any): void;
4598 preWalkForOfStatement(statement?: any): void;
4599 walkForOfStatement(statement?: any): void;
4600 preWalkFunctionDeclaration(statement?: any): void;
4601 walkFunctionDeclaration(statement?: any): void;
4602 blockPreWalkImportDeclaration(statement?: any): void;
4603 enterDeclaration(declaration?: any, onIdent?: any): void;
4604 blockPreWalkExportNamedDeclaration(statement?: any): void;
4605 walkExportNamedDeclaration(statement?: any): void;
4606 blockPreWalkExportDefaultDeclaration(statement?: any): void;
4607 walkExportDefaultDeclaration(statement?: any): void;
4608 blockPreWalkExportAllDeclaration(statement?: any): void;
4609 preWalkVariableDeclaration(statement?: any): void;
4610 blockPreWalkVariableDeclaration(statement?: any): void;
4611 walkVariableDeclaration(statement?: any): void;
4612 blockPreWalkClassDeclaration(statement?: any): void;
4613 walkClassDeclaration(statement?: any): void;
4614 preWalkSwitchCases(switchCases?: any): void;
4615 walkSwitchCases(switchCases?: any): void;
4616 preWalkCatchClause(catchClause?: any): void;
4617 walkCatchClause(catchClause?: any): void;
4618 walkPattern(pattern?: any): void;
4619 walkAssignmentPattern(pattern?: any): void;
4620 walkObjectPattern(pattern?: any): void;
4621 walkArrayPattern(pattern?: any): void;
4622 walkRestElement(pattern?: any): void;
4623 walkExpressions(expressions?: any): void;
4624 walkExpression(expression?: any): void;
4625 walkAwaitExpression(expression?: any): void;
4626 walkArrayExpression(expression?: any): void;
4627 walkSpreadElement(expression?: any): void;
4628 walkObjectExpression(expression?: any): void;
4629 walkProperty(prop?: any): void;
4630 walkFunctionExpression(expression?: any): void;
4631 walkArrowFunctionExpression(expression?: any): void;
4632 walkSequenceExpression(expression: SequenceExpression): void;
4633 walkUpdateExpression(expression?: any): void;
4634 walkUnaryExpression(expression?: any): void;
4635 walkLeftRightExpression(expression?: any): void;
4636 walkBinaryExpression(expression?: any): void;
4637 walkLogicalExpression(expression?: any): void;
4638 walkAssignmentExpression(expression?: any): void;
4639 walkConditionalExpression(expression?: any): void;
4640 walkNewExpression(expression?: any): void;
4641 walkYieldExpression(expression?: any): void;
4642 walkTemplateLiteral(expression?: any): void;
4643 walkTaggedTemplateExpression(expression?: any): void;
4644 walkClassExpression(expression?: any): void;
4645 walkChainExpression(expression: ChainExpression): void;
4646 walkImportExpression(expression?: any): void;
4647 walkCallExpression(expression?: any): void;
4648 walkMemberExpression(expression?: any): void;
4649 walkMemberExpressionWithExpressionName(
4650 expression?: any,
4651 name?: any,
4652 rootInfo?: any,
4653 members?: any,
4654 onUnhandled?: any
4655 ): void;
4656 walkThisExpression(expression?: any): void;
4657 walkIdentifier(expression?: any): void;
4658 walkMetaProperty(metaProperty: MetaProperty): void;
4659 callHooksForExpression(hookMap: any, expr: any, ...args: any[]): any;
4660 callHooksForExpressionWithFallback<T, R>(
4661 hookMap: HookMap<SyncBailHook<T, R>>,
4662 expr: MemberExpression,
4663 fallback: (
4664 arg0: string,
4665 arg1: string | ScopeInfo | VariableInfo,
4666 arg2: () => string[]
4667 ) => any,
4668 defined: (arg0: string) => any,
4669 ...args: AsArray<T>
4670 ): R;
4671 callHooksForName<T, R>(
4672 hookMap: HookMap<SyncBailHook<T, R>>,
4673 name: string,
4674 ...args: AsArray<T>
4675 ): R;
4676 callHooksForInfo<T, R>(
4677 hookMap: HookMap<SyncBailHook<T, R>>,
4678 info: ExportedVariableInfo,
4679 ...args: AsArray<T>
4680 ): R;
4681 callHooksForInfoWithFallback<T, R>(
4682 hookMap: HookMap<SyncBailHook<T, R>>,
4683 info: ExportedVariableInfo,
4684 fallback: (arg0: string) => any,
4685 defined: () => any,
4686 ...args: AsArray<T>
4687 ): R;
4688 callHooksForNameWithFallback<T, R>(
4689 hookMap: HookMap<SyncBailHook<T, R>>,
4690 name: string,
4691 fallback: (arg0: string) => any,
4692 defined: () => any,
4693 ...args: AsArray<T>
4694 ): R;
4695 inScope(params: any, fn: () => void): void;
4696 inFunctionScope(hasThis?: any, params?: any, fn?: any): void;
4697 inBlockScope(fn?: any): void;
4698 detectMode(statements?: any): void;
4699 enterPatterns(patterns?: any, onIdent?: any): void;
4700 enterPattern(pattern?: any, onIdent?: any): void;
4701 enterIdentifier(pattern?: any, onIdent?: any): void;
4702 enterObjectPattern(pattern?: any, onIdent?: any): void;
4703 enterArrayPattern(pattern?: any, onIdent?: any): void;
4704 enterRestElement(pattern?: any, onIdent?: any): void;
4705 enterAssignmentPattern(pattern?: any, onIdent?: any): void;
4706 evaluateExpression(
4707 expression: Expression
4708 ): undefined | BasicEvaluatedExpression;
4709 parseString(expression?: any): any;
4710 parseCalculatedString(expression?: any): any;
4711 evaluate(source?: any): undefined | BasicEvaluatedExpression;
4712 isPure(
4713 expr:
4714 | undefined
4715 | null
4716 | UnaryExpression
4717 | ThisExpression
4718 | ArrayExpression
4719 | ObjectExpression
4720 | FunctionExpression
4721 | ArrowFunctionExpression
4722 | YieldExpression
4723 | SimpleLiteral
4724 | RegExpLiteral
4725 | UpdateExpression
4726 | BinaryExpression
4727 | AssignmentExpression
4728 | LogicalExpression
4729 | MemberExpression
4730 | ConditionalExpression
4731 | SimpleCallExpression
4732 | NewExpression
4733 | SequenceExpression
4734 | TemplateLiteral
4735 | TaggedTemplateExpression
4736 | ClassExpression
4737 | MetaProperty
4738 | Identifier
4739 | AwaitExpression
4740 | ImportExpression
4741 | ChainExpression
4742 | FunctionDeclaration
4743 | VariableDeclaration
4744 | ClassDeclaration,
4745 commentsStartPos: number
4746 ): boolean;
4747 getComments(range?: any): any[];
4748 isAsiPosition(pos: number): boolean;
4749 unsetAsiPosition(pos: number): void;
4750 isStatementLevelExpression(expr?: any): boolean;
4751 getTagData(name?: any, tag?: any): any;
4752 tagVariable(name?: any, tag?: any, data?: any): void;
4753 defineVariable(name?: any): void;
4754 undefineVariable(name?: any): void;
4755 isVariableDefined(name?: any): boolean;
4756 getVariableInfo(name: string): ExportedVariableInfo;
4757 setVariable(name: string, variableInfo: ExportedVariableInfo): void;
4758 parseCommentOptions(
4759 range?: any
4760 ): { options: null; errors: null } | { options: object; errors: any[] };
4761 extractMemberExpressionChain(
4762 expression: MemberExpression
4763 ): {
4764 members: string[];
4765 object:
4766 | UnaryExpression
4767 | ThisExpression
4768 | ArrayExpression
4769 | ObjectExpression
4770 | FunctionExpression
4771 | ArrowFunctionExpression
4772 | YieldExpression
4773 | SimpleLiteral
4774 | RegExpLiteral
4775 | UpdateExpression
4776 | BinaryExpression
4777 | AssignmentExpression
4778 | LogicalExpression
4779 | MemberExpression
4780 | ConditionalExpression
4781 | SimpleCallExpression
4782 | NewExpression
4783 | SequenceExpression
4784 | TemplateLiteral
4785 | TaggedTemplateExpression
4786 | ClassExpression
4787 | MetaProperty
4788 | Identifier
4789 | AwaitExpression
4790 | ImportExpression
4791 | ChainExpression
4792 | Super;
4793 };
4794 getFreeInfoFromVariable(
4795 varName: string
4796 ): { name: string; info: string | VariableInfo };
4797 getMemberExpressionInfo(
4798 expression: MemberExpression,
4799 allowedTypes: number
4800 ): undefined | CallExpressionInfo | ExpressionExpressionInfo;
4801 getNameForExpression(
4802 expression: MemberExpression
4803 ): {
4804 name: string;
4805 rootInfo: ExportedVariableInfo;
4806 getMembers: () => string[];
4807 };
4808 static ALLOWED_MEMBER_TYPES_ALL: 3;
4809 static ALLOWED_MEMBER_TYPES_EXPRESSION: 2;
4810 static ALLOWED_MEMBER_TYPES_CALL_EXPRESSION: 1;
4811}
4812
4813/**
4814 * Parser options for javascript modules.
4815 */
4816declare interface JavascriptParserOptions {
4817 [index: string]: any;
4818
4819 /**
4820 * Set the value of `require.amd` and `define.amd`. Or disable AMD support.
4821 */
4822 amd?: false | { [index: string]: any };
4823
4824 /**
4825 * Enable/disable special handling for browserify bundles.
4826 */
4827 browserify?: boolean;
4828
4829 /**
4830 * Enable/disable parsing of CommonJs syntax.
4831 */
4832 commonjs?: boolean;
4833
4834 /**
4835 * Enable/disable parsing of magic comments in CommonJs syntax.
4836 */
4837 commonjsMagicComments?: boolean;
4838
4839 /**
4840 * Enable warnings for full dynamic dependencies.
4841 */
4842 exprContextCritical?: boolean;
4843
4844 /**
4845 * Enable recursive directory lookup for full dynamic dependencies.
4846 */
4847 exprContextRecursive?: boolean;
4848
4849 /**
4850 * Sets the default regular expression for full dynamic dependencies.
4851 */
4852 exprContextRegExp?: boolean | RegExp;
4853
4854 /**
4855 * Set the default request for full dynamic dependencies.
4856 */
4857 exprContextRequest?: string;
4858
4859 /**
4860 * Enable/disable parsing of EcmaScript Modules syntax.
4861 */
4862 harmony?: boolean;
4863
4864 /**
4865 * Enable/disable parsing of import() syntax.
4866 */
4867 import?: boolean;
4868
4869 /**
4870 * Include polyfills or mocks for various node stuff.
4871 */
4872 node?: false | NodeOptions;
4873
4874 /**
4875 * Enable/disable parsing of require.context syntax.
4876 */
4877 requireContext?: boolean;
4878
4879 /**
4880 * Enable/disable parsing of require.ensure syntax.
4881 */
4882 requireEnsure?: boolean;
4883
4884 /**
4885 * Enable/disable parsing of require.include syntax.
4886 */
4887 requireInclude?: boolean;
4888
4889 /**
4890 * Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError.
4891 */
4892 requireJs?: boolean;
4893
4894 /**
4895 * Emit errors instead of warnings when imported names don't exist in imported module.
4896 */
4897 strictExportPresence?: boolean;
4898
4899 /**
4900 * Handle the this context correctly according to the spec for namespace objects.
4901 */
4902 strictThisContextOnImports?: boolean;
4903
4904 /**
4905 * Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register.
4906 */
4907 system?: boolean;
4908
4909 /**
4910 * Enable warnings when using the require function in a not statically analyse-able way.
4911 */
4912 unknownContextCritical?: boolean;
4913
4914 /**
4915 * Enable recursive directory lookup when using the require function in a not statically analyse-able way.
4916 */
4917 unknownContextRecursive?: boolean;
4918
4919 /**
4920 * Sets the regular expression when using the require function in a not statically analyse-able way.
4921 */
4922 unknownContextRegExp?: boolean | RegExp;
4923
4924 /**
4925 * Sets the request when using the require function in a not statically analyse-able way.
4926 */
4927 unknownContextRequest?: string;
4928
4929 /**
4930 * Enable/disable parsing of new URL() syntax.
4931 */
4932 url?: boolean | "relative";
4933
4934 /**
4935 * Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register().
4936 */
4937 worker?: boolean | string[];
4938
4939 /**
4940 * Enable warnings for partial dynamic dependencies.
4941 */
4942 wrappedContextCritical?: boolean;
4943
4944 /**
4945 * Enable recursive directory lookup for partial dynamic dependencies.
4946 */
4947 wrappedContextRecursive?: boolean;
4948
4949 /**
4950 * Set the inner regular expression for partial dynamic dependencies.
4951 */
4952 wrappedContextRegExp?: RegExp;
4953}
4954declare class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
4955 constructor(runtimeRequirements?: any);
4956 static getCompilationHooks(
4957 compilation: Compilation
4958 ): JsonpCompilationPluginHooks;
4959
4960 /**
4961 * Runtime modules without any dependencies to other runtime modules
4962 */
4963 static STAGE_NORMAL: number;
4964
4965 /**
4966 * Runtime modules with simple dependencies on other runtime modules
4967 */
4968 static STAGE_BASIC: number;
4969
4970 /**
4971 * Runtime modules which attach to handlers of other runtime modules
4972 */
4973 static STAGE_ATTACH: number;
4974
4975 /**
4976 * Runtime modules which trigger actions on bootstrap
4977 */
4978 static STAGE_TRIGGER: number;
4979}
4980declare interface JsonpCompilationPluginHooks {
4981 linkPreload: SyncWaterfallHook<[string, Chunk]>;
4982 linkPrefetch: SyncWaterfallHook<[string, Chunk]>;
4983}
4984declare class JsonpTemplatePlugin {
4985 constructor();
4986
4987 /**
4988 * Apply the plugin
4989 */
4990 apply(compiler: Compiler): void;
4991 static getCompilationHooks(
4992 compilation: Compilation
4993 ): JsonpCompilationPluginHooks;
4994}
4995declare interface KnownAssetInfo {
4996 /**
4997 * true, if the asset can be long term cached forever (contains a hash)
4998 */
4999 immutable?: boolean;
5000
5001 /**
5002 * whether the asset is minimized
5003 */
5004 minimized?: boolean;
5005
5006 /**
5007 * the value(s) of the full hash used for this asset
5008 */
5009 fullhash?: string | string[];
5010
5011 /**
5012 * the value(s) of the chunk hash used for this asset
5013 */
5014 chunkhash?: string | string[];
5015
5016 /**
5017 * the value(s) of the module hash used for this asset
5018 */
5019 modulehash?: string | string[];
5020
5021 /**
5022 * the value(s) of the content hash used for this asset
5023 */
5024 contenthash?: string | string[];
5025
5026 /**
5027 * when asset was created from a source file (potentially transformed), the original filename relative to compilation context
5028 */
5029 sourceFilename?: string;
5030
5031 /**
5032 * size in bytes, only set after asset has been emitted
5033 */
5034 size?: number;
5035
5036 /**
5037 * true, when asset is only used for development and doesn't count towards user-facing assets
5038 */
5039 development?: boolean;
5040
5041 /**
5042 * true, when asset ships data for updating an existing application (HMR)
5043 */
5044 hotModuleReplacement?: boolean;
5045
5046 /**
5047 * true, when asset is javascript and an ESM
5048 */
5049 javascriptModule?: boolean;
5050
5051 /**
5052 * object of pointers to other assets, keyed by type of relation (only points from parent to child)
5053 */
5054 related?: Record<string, string | string[]>;
5055}
5056declare interface KnownBuildMeta {
5057 moduleArgument?: string;
5058 exportsArgument?: string;
5059 strict?: boolean;
5060 moduleConcatenationBailout?: string;
5061 exportsType?: "namespace" | "dynamic" | "default" | "flagged";
5062 defaultObject?: false | "redirect" | "redirect-warn";
5063 strictHarmonyModule?: boolean;
5064 async?: boolean;
5065 sideEffectFree?: boolean;
5066}
5067declare interface KnownCreateStatsOptionsContext {
5068 forToString?: boolean;
5069}
5070declare interface KnownNormalizedStatsOptions {
5071 context: string;
5072 requestShortener: RequestShortener;
5073 chunksSort: string;
5074 modulesSort: string;
5075 chunkModulesSort: string;
5076 nestedModulesSort: string;
5077 assetsSort: string;
5078 ids: boolean;
5079 cachedAssets: boolean;
5080 groupAssetsByEmitStatus: boolean;
5081 groupAssetsByPath: boolean;
5082 groupAssetsByExtension: boolean;
5083 assetsSpace: number;
5084 excludeAssets: ((value: string, asset: StatsAsset) => boolean)[];
5085 excludeModules: ((
5086 name: string,
5087 module: StatsModule,
5088 type: "module" | "chunk" | "root-of-chunk" | "nested"
5089 ) => boolean)[];
5090 warningsFilter: ((warning: StatsError, textValue: string) => boolean)[];
5091 cachedModules: boolean;
5092 orphanModules: boolean;
5093 dependentModules: boolean;
5094 runtimeModules: boolean;
5095 groupModulesByCacheStatus: boolean;
5096 groupModulesByLayer: boolean;
5097 groupModulesByAttributes: boolean;
5098 groupModulesByPath: boolean;
5099 groupModulesByExtension: boolean;
5100 groupModulesByType: boolean;
5101 entrypoints: boolean | "auto";
5102 chunkGroups: boolean;
5103 chunkGroupAuxiliary: boolean;
5104 chunkGroupChildren: boolean;
5105 chunkGroupMaxAssets: number;
5106 modulesSpace: number;
5107 chunkModulesSpace: number;
5108 nestedModulesSpace: number;
5109 logging: false | "none" | "verbose" | "error" | "warn" | "info" | "log";
5110 loggingDebug: ((value: string) => boolean)[];
5111 loggingTrace: boolean;
5112}
5113declare interface KnownStatsAsset {
5114 type: string;
5115 name: string;
5116 info: AssetInfo;
5117 size: number;
5118 emitted: boolean;
5119 comparedForEmit: boolean;
5120 cached: boolean;
5121 related?: StatsAsset[];
5122 chunkNames?: (string | number)[];
5123 chunkIdHints?: (string | number)[];
5124 chunks?: (string | number)[];
5125 auxiliaryChunkNames?: (string | number)[];
5126 auxiliaryChunks?: (string | number)[];
5127 auxiliaryChunkIdHints?: (string | number)[];
5128 filteredRelated?: number;
5129 isOverSizeLimit?: boolean;
5130}
5131declare interface KnownStatsChunk {
5132 rendered: boolean;
5133 initial: boolean;
5134 entry: boolean;
5135 recorded: boolean;
5136 reason?: string;
5137 size: number;
5138 sizes?: Record<string, number>;
5139 names?: string[];
5140 idHints?: string[];
5141 runtime?: string[];
5142 files?: string[];
5143 auxiliaryFiles?: string[];
5144 hash: string;
5145 childrenByOrder?: Record<string, (string | number)[]>;
5146 id?: string | number;
5147 siblings?: (string | number)[];
5148 parents?: (string | number)[];
5149 children?: (string | number)[];
5150 modules?: StatsModule[];
5151 filteredModules?: number;
5152 origins?: StatsChunkOrigin[];
5153}
5154declare interface KnownStatsChunkGroup {
5155 name?: string;
5156 chunks?: (string | number)[];
5157 assets?: { name: string; size?: number }[];
5158 filteredAssets?: number;
5159 assetsSize?: number;
5160 auxiliaryAssets?: { name: string; size?: number }[];
5161 filteredAuxiliaryAssets?: number;
5162 auxiliaryAssetsSize?: number;
5163 children?: { [index: string]: StatsChunkGroup[] };
5164 childAssets?: { [index: string]: string[] };
5165 isOverSizeLimit?: boolean;
5166}
5167declare interface KnownStatsChunkOrigin {
5168 module?: string;
5169 moduleIdentifier?: string;
5170 moduleName?: string;
5171 loc?: string;
5172 request?: string;
5173 moduleId?: string | number;
5174}
5175declare interface KnownStatsCompilation {
5176 env?: any;
5177 name?: string;
5178 hash?: string;
5179 version?: string;
5180 time?: number;
5181 builtAt?: number;
5182 needAdditionalPass?: boolean;
5183 publicPath?: string;
5184 outputPath?: string;
5185 assetsByChunkName?: Record<string, string[]>;
5186 assets?: StatsAsset[];
5187 filteredAssets?: number;
5188 chunks?: StatsChunk[];
5189 modules?: StatsModule[];
5190 filteredModules?: number;
5191 entrypoints?: Record<string, StatsChunkGroup>;
5192 namedChunkGroups?: Record<string, StatsChunkGroup>;
5193 errors?: StatsError[];
5194 errorsCount?: number;
5195 warnings?: StatsError[];
5196 warningsCount?: number;
5197 children?: StatsCompilation[];
5198 logging?: Record<string, StatsLogging>;
5199}
5200declare interface KnownStatsError {
5201 message: string;
5202 chunkName?: string;
5203 chunkEntry?: boolean;
5204 chunkInitial?: boolean;
5205 file?: string;
5206 moduleIdentifier?: string;
5207 moduleName?: string;
5208 loc?: string;
5209 chunkId?: string | number;
5210 moduleId?: string | number;
5211 moduleTrace?: any;
5212 details?: any;
5213 stack?: any;
5214}
5215declare interface KnownStatsFactoryContext {
5216 type: string;
5217 makePathsRelative?: (arg0: string) => string;
5218 compilation?: Compilation;
5219 rootModules?: Set<Module>;
5220 compilationFileToChunks?: Map<string, Chunk[]>;
5221 compilationAuxiliaryFileToChunks?: Map<string, Chunk[]>;
5222 runtime?: RuntimeSpec;
5223 cachedGetErrors?: (arg0: Compilation) => WebpackError[];
5224 cachedGetWarnings?: (arg0: Compilation) => WebpackError[];
5225}
5226declare interface KnownStatsLogging {
5227 entries: StatsLoggingEntry[];
5228 filteredEntries: number;
5229 debug: boolean;
5230}
5231declare interface KnownStatsLoggingEntry {
5232 type: string;
5233 message: string;
5234 trace?: string[];
5235 children?: StatsLoggingEntry[];
5236 args?: any[];
5237 time?: number;
5238}
5239declare interface KnownStatsModule {
5240 type?: string;
5241 moduleType?: string;
5242 layer?: string;
5243 identifier?: string;
5244 name?: string;
5245 nameForCondition?: string;
5246 index?: number;
5247 preOrderIndex?: number;
5248 index2?: number;
5249 postOrderIndex?: number;
5250 size?: number;
5251 sizes?: { [index: string]: number };
5252 cacheable?: boolean;
5253 built?: boolean;
5254 codeGenerated?: boolean;
5255 cached?: boolean;
5256 optional?: boolean;
5257 orphan?: boolean;
5258 id?: string | number;
5259 issuerId?: string | number;
5260 chunks?: (string | number)[];
5261 assets?: (string | number)[];
5262 dependent?: boolean;
5263 issuer?: string;
5264 issuerName?: string;
5265 issuerPath?: StatsModuleIssuer[];
5266 failed?: boolean;
5267 errors?: number;
5268 warnings?: number;
5269 profile?: StatsProfile;
5270 reasons?: StatsModuleReason[];
5271 usedExports?: boolean | string[];
5272 providedExports?: string[];
5273 optimizationBailout?: string[];
5274 depth?: number;
5275 modules?: StatsModule[];
5276 filteredModules?: number;
5277 source?: string | Buffer;
5278}
5279declare interface KnownStatsModuleIssuer {
5280 identifier?: string;
5281 name?: string;
5282 id?: string | number;
5283 profile?: StatsProfile;
5284}
5285declare interface KnownStatsModuleReason {
5286 moduleIdentifier?: string;
5287 module?: string;
5288 moduleName?: string;
5289 resolvedModuleIdentifier?: string;
5290 resolvedModule?: string;
5291 type?: string;
5292 active: boolean;
5293 explanation?: string;
5294 userRequest?: string;
5295 loc?: string;
5296 moduleId?: string | number;
5297 resolvedModuleId?: string | number;
5298}
5299declare interface KnownStatsPrinterContext {
5300 type?: string;
5301 compilation?: StatsCompilation;
5302 chunkGroup?: StatsChunkGroup;
5303 asset?: StatsAsset;
5304 module?: StatsModule;
5305 chunk?: StatsChunk;
5306 moduleReason?: StatsModuleReason;
5307 bold?: (str: string) => string;
5308 yellow?: (str: string) => string;
5309 red?: (str: string) => string;
5310 green?: (str: string) => string;
5311 magenta?: (str: string) => string;
5312 cyan?: (str: string) => string;
5313 formatFilename?: (file: string, oversize?: boolean) => string;
5314 formatModuleId?: (id: string) => string;
5315 formatChunkId?: (
5316 id: string,
5317 direction?: "parent" | "child" | "sibling"
5318 ) => string;
5319 formatSize?: (size: number) => string;
5320 formatDateTime?: (dateTime: number) => string;
5321 formatFlag?: (flag: string) => string;
5322 formatTime?: (time: number, boldQuantity?: boolean) => string;
5323 chunkGroupKind?: string;
5324}
5325declare interface KnownStatsProfile {
5326 total: number;
5327 resolving: number;
5328 restoring: number;
5329 building: number;
5330 integration: number;
5331 storing: number;
5332 additionalResolving: number;
5333 additionalIntegration: number;
5334 factory: number;
5335 dependencies: number;
5336}
5337declare class LazySet<T> {
5338 constructor(iterable?: Iterable<T>);
5339 readonly size: number;
5340 add(item: T): LazySet<T>;
5341 addAll(iterable: LazySet<T> | Iterable<T>): LazySet<T>;
5342 clear(): void;
5343 delete(value: T): boolean;
5344 entries(): IterableIterator<[T, T]>;
5345 forEach(
5346 callbackFn: (arg0: T, arg1: T, arg2: Set<T>) => void,
5347 thisArg?: any
5348 ): void;
5349 has(item: T): boolean;
5350 keys(): IterableIterator<T>;
5351 values(): IterableIterator<T>;
5352 [Symbol.iterator](): IterableIterator<T>;
5353 readonly [Symbol.toStringTag]: string;
5354 serialize(__0: { write: any }): void;
5355 static deserialize(__0: { read: any }): LazySet<any>;
5356}
5357declare interface LibIdentOptions {
5358 /**
5359 * absolute context path to which lib ident is relative to
5360 */
5361 context: string;
5362
5363 /**
5364 * object for caching
5365 */
5366 associatedObjectForCache?: Object;
5367}
5368declare class LibManifestPlugin {
5369 constructor(options?: any);
5370 options: any;
5371
5372 /**
5373 * Apply the plugin
5374 */
5375 apply(compiler: Compiler): void;
5376}
5377declare interface LibraryContext<T> {
5378 compilation: Compilation;
5379 options: T;
5380}
5381
5382/**
5383 * Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.
5384 */
5385declare interface LibraryCustomUmdCommentObject {
5386 /**
5387 * Set comment for `amd` section in UMD.
5388 */
5389 amd?: string;
5390
5391 /**
5392 * Set comment for `commonjs` (exports) section in UMD.
5393 */
5394 commonjs?: string;
5395
5396 /**
5397 * Set comment for `commonjs2` (module.exports) section in UMD.
5398 */
5399 commonjs2?: string;
5400
5401 /**
5402 * Set comment for `root` (global variable) section in UMD.
5403 */
5404 root?: string;
5405}
5406
5407/**
5408 * Description object for all UMD variants of the library name.
5409 */
5410declare interface LibraryCustomUmdObject {
5411 /**
5412 * Name of the exposed AMD library in the UMD.
5413 */
5414 amd?: string;
5415
5416 /**
5417 * Name of the exposed commonjs export in the UMD.
5418 */
5419 commonjs?: string;
5420
5421 /**
5422 * Name of the property exposed globally by a UMD library.
5423 */
5424 root?: string | string[];
5425}
5426type LibraryExport = string | string[];
5427type LibraryName = string | string[] | LibraryCustomUmdObject;
5428
5429/**
5430 * Options for library.
5431 */
5432declare interface LibraryOptions {
5433 /**
5434 * Add a comment in the UMD wrapper.
5435 */
5436 auxiliaryComment?: string | LibraryCustomUmdCommentObject;
5437
5438 /**
5439 * Specify which export should be exposed as library.
5440 */
5441 export?: string | string[];
5442
5443 /**
5444 * The name of the library (some types allow unnamed libraries too).
5445 */
5446 name?: string | string[] | LibraryCustomUmdObject;
5447
5448 /**
5449 * Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
5450 */
5451 type: string;
5452
5453 /**
5454 * If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.
5455 */
5456 umdNamedDefine?: boolean;
5457}
5458declare class LibraryTemplatePlugin {
5459 constructor(
5460 name: LibraryName,
5461 target: string,
5462 umdNamedDefine: boolean,
5463 auxiliaryComment: AuxiliaryComment,
5464 exportProperty: LibraryExport
5465 );
5466 library: {
5467 type: string;
5468 name: LibraryName;
5469 umdNamedDefine: boolean;
5470 auxiliaryComment: AuxiliaryComment;
5471 export: LibraryExport;
5472 };
5473
5474 /**
5475 * Apply the plugin
5476 */
5477 apply(compiler: Compiler): void;
5478}
5479declare class LimitChunkCountPlugin {
5480 constructor(options?: LimitChunkCountPluginOptions);
5481 options?: LimitChunkCountPluginOptions;
5482 apply(compiler: Compiler): void;
5483}
5484declare interface LimitChunkCountPluginOptions {
5485 /**
5486 * Constant overhead for a chunk.
5487 */
5488 chunkOverhead?: number;
5489
5490 /**
5491 * Multiplicator for initial chunks.
5492 */
5493 entryChunkMultiplicator?: number;
5494
5495 /**
5496 * Limit the maximum number of chunks using a value greater greater than or equal to 1.
5497 */
5498 maxChunks: number;
5499}
5500declare interface LoadScriptCompilationHooks {
5501 createScript: SyncWaterfallHook<[string, Chunk]>;
5502}
5503declare class LoadScriptRuntimeModule extends HelperRuntimeModule {
5504 constructor();
5505 static getCompilationHooks(
5506 compilation: Compilation
5507 ): LoadScriptCompilationHooks;
5508
5509 /**
5510 * Runtime modules without any dependencies to other runtime modules
5511 */
5512 static STAGE_NORMAL: number;
5513
5514 /**
5515 * Runtime modules with simple dependencies on other runtime modules
5516 */
5517 static STAGE_BASIC: number;
5518
5519 /**
5520 * Runtime modules which attach to handlers of other runtime modules
5521 */
5522 static STAGE_ATTACH: number;
5523
5524 /**
5525 * Runtime modules which trigger actions on bootstrap
5526 */
5527 static STAGE_TRIGGER: number;
5528}
5529
5530/**
5531 * Custom values available in the loader context.
5532 */
5533declare interface Loader {
5534 [index: string]: any;
5535}
5536declare interface LoaderItem {
5537 loader: string;
5538 options: any;
5539 ident: null | string;
5540 type: null | string;
5541}
5542declare class LoaderOptionsPlugin {
5543 constructor(options?: LoaderOptionsPluginOptions);
5544 options: LoaderOptionsPluginOptions;
5545
5546 /**
5547 * Apply the plugin
5548 */
5549 apply(compiler: Compiler): void;
5550}
5551declare interface LoaderOptionsPluginOptions {
5552 [index: string]: any;
5553
5554 /**
5555 * Whether loaders should be in debug mode or not. debug will be removed as of webpack 3.
5556 */
5557 debug?: boolean;
5558
5559 /**
5560 * Where loaders can be switched to minimize mode.
5561 */
5562 minimize?: boolean;
5563
5564 /**
5565 * A configuration object that can be used to configure older loaders.
5566 */
5567 options?: {
5568 [index: string]: any;
5569 /**
5570 * The context that can be used to configure older loaders.
5571 */
5572 context?: string;
5573 };
5574}
5575declare class LoaderTargetPlugin {
5576 constructor(target: string);
5577 target: string;
5578
5579 /**
5580 * Apply the plugin
5581 */
5582 apply(compiler: Compiler): void;
5583}
5584declare interface LogEntry {
5585 type: string;
5586 args: any[];
5587 time: number;
5588 trace?: string[];
5589}
5590declare const MEASURE_END_OPERATION: unique symbol;
5591declare const MEASURE_START_OPERATION: unique symbol;
5592declare interface MainRenderContext {
5593 /**
5594 * the chunk
5595 */
5596 chunk: Chunk;
5597
5598 /**
5599 * the dependency templates
5600 */
5601 dependencyTemplates: DependencyTemplates;
5602
5603 /**
5604 * the runtime template
5605 */
5606 runtimeTemplate: RuntimeTemplate;
5607
5608 /**
5609 * the module graph
5610 */
5611 moduleGraph: ModuleGraph;
5612
5613 /**
5614 * the chunk graph
5615 */
5616 chunkGraph: ChunkGraph;
5617
5618 /**
5619 * results of code generation
5620 */
5621 codeGenerationResults: CodeGenerationResults;
5622
5623 /**
5624 * hash to be used for render call
5625 */
5626 hash: string;
5627}
5628declare abstract class MainTemplate {
5629 hooks: Readonly<{
5630 renderManifest: { tap: (options?: any, fn?: any) => void };
5631 modules: { tap: () => never };
5632 moduleObj: { tap: () => never };
5633 require: { tap: (options?: any, fn?: any) => void };
5634 beforeStartup: { tap: () => never };
5635 startup: { tap: () => never };
5636 afterStartup: { tap: () => never };
5637 render: { tap: (options?: any, fn?: any) => void };
5638 renderWithEntry: { tap: (options?: any, fn?: any) => void };
5639 assetPath: {
5640 tap: (options?: any, fn?: any) => void;
5641 call: (filename?: any, options?: any) => string;
5642 };
5643 hash: { tap: (options?: any, fn?: any) => void };
5644 hashForChunk: { tap: (options?: any, fn?: any) => void };
5645 globalHashPaths: { tap: () => void };
5646 globalHash: { tap: () => void };
5647 hotBootstrap: { tap: () => never };
5648 bootstrap: SyncWaterfallHook<
5649 [string, Chunk, string, ModuleTemplate, DependencyTemplates]
5650 >;
5651 localVars: SyncWaterfallHook<[string, Chunk, string]>;
5652 requireExtensions: SyncWaterfallHook<[string, Chunk, string]>;
5653 requireEnsure: SyncWaterfallHook<[string, Chunk, string, string]>;
5654 readonly jsonpScript: SyncWaterfallHook<[string, Chunk]>;
5655 readonly linkPrefetch: SyncWaterfallHook<[string, Chunk]>;
5656 readonly linkPreload: SyncWaterfallHook<[string, Chunk]>;
5657 }>;
5658 renderCurrentHashCode: (hash: string, length?: number) => string;
5659 getPublicPath: (options: object) => string;
5660 getAssetPath: (path?: any, options?: any) => string;
5661 getAssetPathWithInfo: (
5662 path?: any,
5663 options?: any
5664 ) => { path: string; info: AssetInfo };
5665 readonly requireFn: "__webpack_require__";
5666 readonly outputOptions: Output;
5667}
5668declare interface MapOptions {
5669 columns?: boolean;
5670 module?: boolean;
5671}
5672
5673/**
5674 * Options object for in-memory caching.
5675 */
5676declare interface MemoryCacheOptions {
5677 /**
5678 * In memory caching.
5679 */
5680 type: "memory";
5681}
5682declare class MemoryCachePlugin {
5683 constructor();
5684
5685 /**
5686 * Apply the plugin
5687 */
5688 apply(compiler: Compiler): void;
5689}
5690declare class MinChunkSizePlugin {
5691 constructor(options: MinChunkSizePluginOptions);
5692 options: MinChunkSizePluginOptions;
5693
5694 /**
5695 * Apply the plugin
5696 */
5697 apply(compiler: Compiler): void;
5698}
5699declare interface MinChunkSizePluginOptions {
5700 /**
5701 * Constant overhead for a chunk.
5702 */
5703 chunkOverhead?: number;
5704
5705 /**
5706 * Multiplicator for initial chunks.
5707 */
5708 entryChunkMultiplicator?: number;
5709
5710 /**
5711 * Minimum number of characters.
5712 */
5713 minChunkSize: number;
5714}
5715declare class Module extends DependenciesBlock {
5716 constructor(type: string, context?: string, layer?: string);
5717 type: string;
5718 context: null | string;
5719 layer: null | string;
5720 needId: boolean;
5721 debugId: number;
5722 resolveOptions: ResolveOptionsWebpackOptions;
5723 factoryMeta?: object;
5724 useSourceMap: boolean;
5725 useSimpleSourceMap: boolean;
5726 buildMeta: BuildMeta;
5727 buildInfo: Record<string, any>;
5728 presentationalDependencies?: Dependency[];
5729 id: string | number;
5730 readonly hash: string;
5731 readonly renderedHash: string;
5732 profile: null | ModuleProfile;
5733 index: number;
5734 index2: number;
5735 depth: number;
5736 issuer: null | Module;
5737 readonly usedExports: null | boolean | SortableSet<string>;
5738 readonly optimizationBailout: (
5739 | string
5740 | ((requestShortener: RequestShortener) => string)
5741 )[];
5742 readonly optional: boolean;
5743 addChunk(chunk?: any): boolean;
5744 removeChunk(chunk?: any): void;
5745 isInChunk(chunk?: any): boolean;
5746 isEntryModule(): boolean;
5747 getChunks(): Chunk[];
5748 getNumberOfChunks(): number;
5749 readonly chunksIterable: Iterable<Chunk>;
5750 isProvided(exportName: string): null | boolean;
5751 readonly exportsArgument: string;
5752 readonly moduleArgument: string;
5753 getExportsType(
5754 moduleGraph: ModuleGraph,
5755 strict: boolean
5756 ): "namespace" | "default-only" | "default-with-named" | "dynamic";
5757 addPresentationalDependency(presentationalDependency: Dependency): void;
5758 addWarning(warning: WebpackError): void;
5759 getWarnings(): undefined | Iterable<WebpackError>;
5760 getNumberOfWarnings(): number;
5761 addError(error: WebpackError): void;
5762 getErrors(): undefined | Iterable<WebpackError>;
5763 getNumberOfErrors(): number;
5764
5765 /**
5766 * removes all warnings and errors
5767 */
5768 clearWarningsAndErrors(): void;
5769 isOptional(moduleGraph: ModuleGraph): boolean;
5770 isAccessibleInChunk(
5771 chunkGraph: ChunkGraph,
5772 chunk: Chunk,
5773 ignoreChunk?: Chunk
5774 ): boolean;
5775 isAccessibleInChunkGroup(
5776 chunkGraph: ChunkGraph,
5777 chunkGroup: ChunkGroup,
5778 ignoreChunk?: Chunk
5779 ): boolean;
5780 hasReasonForChunk(
5781 chunk: Chunk,
5782 moduleGraph: ModuleGraph,
5783 chunkGraph: ChunkGraph
5784 ): boolean;
5785 hasReasons(moduleGraph: ModuleGraph, runtime: RuntimeSpec): boolean;
5786 needBuild(
5787 context: NeedBuildContext,
5788 callback: (arg0?: WebpackError, arg1?: boolean) => void
5789 ): void;
5790 needRebuild(
5791 fileTimestamps: Map<string, null | number>,
5792 contextTimestamps: Map<string, null | number>
5793 ): boolean;
5794 invalidateBuild(): void;
5795 identifier(): string;
5796 readableIdentifier(requestShortener: RequestShortener): string;
5797 build(
5798 options: WebpackOptionsNormalized,
5799 compilation: Compilation,
5800 resolver: ResolverWithOptions,
5801 fs: InputFileSystem,
5802 callback: (arg0?: WebpackError) => void
5803 ): void;
5804 getSourceTypes(): Set<string>;
5805 source(
5806 dependencyTemplates: DependencyTemplates,
5807 runtimeTemplate: RuntimeTemplate,
5808 type?: string
5809 ): Source;
5810 size(type?: string): number;
5811 libIdent(options: LibIdentOptions): null | string;
5812 nameForCondition(): null | string;
5813 getConcatenationBailoutReason(
5814 context: ConcatenationBailoutReasonContext
5815 ): undefined | string;
5816 getSideEffectsConnectionState(moduleGraph: ModuleGraph): ConnectionState;
5817 codeGeneration(context: CodeGenerationContext): CodeGenerationResult;
5818 chunkCondition(chunk: Chunk, compilation: Compilation): boolean;
5819
5820 /**
5821 * Assuming this module is in the cache. Update the (cached) module with
5822 * the fresh module from the factory. Usually updates internal references
5823 * and properties.
5824 */
5825 updateCacheModule(module: Module): void;
5826 originalSource(): null | Source;
5827 addCacheDependencies(
5828 fileDependencies: LazySet<string>,
5829 contextDependencies: LazySet<string>,
5830 missingDependencies: LazySet<string>,
5831 buildDependencies: LazySet<string>
5832 ): void;
5833 readonly hasEqualsChunks: any;
5834 readonly isUsed: any;
5835 readonly errors: any;
5836 readonly warnings: any;
5837 used: any;
5838}
5839declare class ModuleConcatenationPlugin {
5840 constructor(options?: any);
5841 options: any;
5842
5843 /**
5844 * Apply the plugin
5845 */
5846 apply(compiler: Compiler): void;
5847}
5848declare abstract class ModuleDependency extends Dependency {
5849 request: string;
5850 userRequest: string;
5851 range: any;
5852}
5853declare abstract class ModuleFactory {
5854 create(
5855 data: ModuleFactoryCreateData,
5856 callback: (arg0?: Error, arg1?: ModuleFactoryResult) => void
5857 ): void;
5858}
5859declare interface ModuleFactoryCreateData {
5860 contextInfo: ModuleFactoryCreateDataContextInfo;
5861 resolveOptions?: ResolveOptionsWebpackOptions;
5862 context: string;
5863 dependencies: Dependency[];
5864}
5865declare interface ModuleFactoryCreateDataContextInfo {
5866 issuer: string;
5867 issuerLayer?: null | string;
5868 compiler: string;
5869}
5870declare interface ModuleFactoryResult {
5871 /**
5872 * the created module or unset if no module was created
5873 */
5874 module?: Module;
5875 fileDependencies?: Set<string>;
5876 contextDependencies?: Set<string>;
5877 missingDependencies?: Set<string>;
5878}
5879declare class ModuleFederationPlugin {
5880 constructor(options: ModuleFederationPluginOptions);
5881
5882 /**
5883 * Apply the plugin
5884 */
5885 apply(compiler: Compiler): void;
5886}
5887declare interface ModuleFederationPluginOptions {
5888 /**
5889 * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.
5890 */
5891 exposes?: (string | ExposesObject)[] | ExposesObject;
5892
5893 /**
5894 * The filename of the container as relative path inside the `output.path` directory.
5895 */
5896 filename?: string;
5897
5898 /**
5899 * Options for library.
5900 */
5901 library?: LibraryOptions;
5902
5903 /**
5904 * The name of the container.
5905 */
5906 name?: string;
5907
5908 /**
5909 * The external type of the remote containers.
5910 */
5911 remoteType?:
5912 | "var"
5913 | "module"
5914 | "assign"
5915 | "this"
5916 | "window"
5917 | "self"
5918 | "global"
5919 | "commonjs"
5920 | "commonjs2"
5921 | "commonjs-module"
5922 | "amd"
5923 | "amd-require"
5924 | "umd"
5925 | "umd2"
5926 | "jsonp"
5927 | "system"
5928 | "promise"
5929 | "import"
5930 | "script";
5931
5932 /**
5933 * Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.
5934 */
5935 remotes?: (string | RemotesObject)[] | RemotesObject;
5936
5937 /**
5938 * Share scope name used for all shared modules (defaults to 'default').
5939 */
5940 shareScope?: string;
5941
5942 /**
5943 * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.
5944 */
5945 shared?: (string | SharedObject)[] | SharedObject;
5946}
5947type ModuleFilterItemTypes =
5948 | string
5949 | RegExp
5950 | ((
5951 name: string,
5952 module: StatsModule,
5953 type: "module" | "chunk" | "root-of-chunk" | "nested"
5954 ) => boolean);
5955declare class ModuleGraph {
5956 constructor();
5957 setParents(
5958 dependency: Dependency,
5959 block: DependenciesBlock,
5960 module: Module
5961 ): void;
5962 getParentModule(dependency: Dependency): Module;
5963 getParentBlock(dependency: Dependency): DependenciesBlock;
5964 setResolvedModule(
5965 originModule: Module,
5966 dependency: Dependency,
5967 module: Module
5968 ): void;
5969 updateModule(dependency: Dependency, module: Module): void;
5970 removeConnection(dependency: Dependency): void;
5971 addExplanation(dependency: Dependency, explanation: string): void;
5972 cloneModuleAttributes(sourceModule: Module, targetModule: Module): void;
5973 removeModuleAttributes(module: Module): void;
5974 removeAllModuleAttributes(): void;
5975 moveModuleConnections(
5976 oldModule: Module,
5977 newModule: Module,
5978 filterConnection: (arg0: ModuleGraphConnection) => boolean
5979 ): void;
5980 copyOutgoingModuleConnections(
5981 oldModule: Module,
5982 newModule: Module,
5983 filterConnection: (arg0: ModuleGraphConnection) => boolean
5984 ): void;
5985 addExtraReason(module: Module, explanation: string): void;
5986 getResolvedModule(dependency: Dependency): Module;
5987 getConnection(dependency: Dependency): undefined | ModuleGraphConnection;
5988 getModule(dependency: Dependency): Module;
5989 getOrigin(dependency: Dependency): Module;
5990 getResolvedOrigin(dependency: Dependency): Module;
5991 getIncomingConnections(module: Module): Iterable<ModuleGraphConnection>;
5992 getOutgoingConnections(module: Module): Iterable<ModuleGraphConnection>;
5993 getIncomingConnectionsByOriginModule(
5994 module: Module
5995 ): Map<Module, ReadonlyArray<ModuleGraphConnection>>;
5996 getProfile(module: Module): null | ModuleProfile;
5997 setProfile(module: Module, profile: null | ModuleProfile): void;
5998 getIssuer(module: Module): null | Module;
5999 setIssuer(module: Module, issuer: null | Module): void;
6000 setIssuerIfUnset(module: Module, issuer: null | Module): void;
6001 getOptimizationBailout(
6002 module: Module
6003 ): (string | ((requestShortener: RequestShortener) => string))[];
6004 getProvidedExports(module: Module): null | true | string[];
6005 isExportProvided(
6006 module: Module,
6007 exportName: string | string[]
6008 ): null | boolean;
6009 getExportsInfo(module: Module): ExportsInfo;
6010 getExportInfo(module: Module, exportName: string): ExportInfo;
6011 getReadOnlyExportInfo(module: Module, exportName: string): ExportInfo;
6012 getUsedExports(
6013 module: Module,
6014 runtime: RuntimeSpec
6015 ): null | boolean | SortableSet<string>;
6016 getPreOrderIndex(module: Module): number;
6017 getPostOrderIndex(module: Module): number;
6018 setPreOrderIndex(module: Module, index: number): void;
6019 setPreOrderIndexIfUnset(module: Module, index: number): boolean;
6020 setPostOrderIndex(module: Module, index: number): void;
6021 setPostOrderIndexIfUnset(module: Module, index: number): boolean;
6022 getDepth(module: Module): number;
6023 setDepth(module: Module, depth: number): void;
6024 setDepthIfLower(module: Module, depth: number): boolean;
6025 isAsync(module: Module): boolean;
6026 setAsync(module: Module): void;
6027 getMeta(thing?: any): Object;
6028 getMetaIfExisting(thing?: any): Object;
6029 static getModuleGraphForModule(
6030 module: Module,
6031 deprecateMessage: string,
6032 deprecationCode: string
6033 ): ModuleGraph;
6034 static setModuleGraphForModule(
6035 module: Module,
6036 moduleGraph: ModuleGraph
6037 ): void;
6038 static ModuleGraphConnection: typeof ModuleGraphConnection;
6039}
6040declare class ModuleGraphConnection {
6041 constructor(
6042 originModule: null | Module,
6043 dependency: null | Dependency,
6044 module: Module,
6045 explanation?: string,
6046 weak?: boolean,
6047 condition?:
6048 | false
6049 | ((arg0: ModuleGraphConnection, arg1: RuntimeSpec) => ConnectionState)
6050 );
6051 originModule: null | Module;
6052 resolvedOriginModule: null | Module;
6053 dependency: null | Dependency;
6054 resolvedModule: Module;
6055 module: Module;
6056 weak: boolean;
6057 conditional: boolean;
6058 condition: (
6059 arg0: ModuleGraphConnection,
6060 arg1: RuntimeSpec
6061 ) => ConnectionState;
6062 explanations: Set<string>;
6063 clone(): ModuleGraphConnection;
6064 addCondition(
6065 condition: (
6066 arg0: ModuleGraphConnection,
6067 arg1: RuntimeSpec
6068 ) => ConnectionState
6069 ): void;
6070 addExplanation(explanation: string): void;
6071 readonly explanation: string;
6072 active: void;
6073 isActive(runtime: RuntimeSpec): boolean;
6074 isTargetActive(runtime: RuntimeSpec): boolean;
6075 getActiveState(runtime: RuntimeSpec): ConnectionState;
6076 setActive(value: boolean): void;
6077 static addConnectionStates: (
6078 a: ConnectionState,
6079 b: ConnectionState
6080 ) => ConnectionState;
6081 static TRANSITIVE_ONLY: typeof TRANSITIVE_ONLY;
6082 static CIRCULAR_CONNECTION: typeof CIRCULAR_CONNECTION;
6083}
6084type ModuleInfo = ConcatenatedModuleInfo | ExternalModuleInfo;
6085
6086/**
6087 * Options affecting the normal modules (`NormalModuleFactory`).
6088 */
6089declare interface ModuleOptions {
6090 /**
6091 * An array of rules applied by default for modules.
6092 */
6093 defaultRules?: (RuleSetRule | "...")[];
6094
6095 /**
6096 * Enable warnings for full dynamic dependencies.
6097 */
6098 exprContextCritical?: boolean;
6099
6100 /**
6101 * Enable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRecursive'.
6102 */
6103 exprContextRecursive?: boolean;
6104
6105 /**
6106 * Sets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRegExp'.
6107 */
6108 exprContextRegExp?: boolean | RegExp;
6109
6110 /**
6111 * Set the default request for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRequest'.
6112 */
6113 exprContextRequest?: string;
6114
6115 /**
6116 * Specify options for each generator.
6117 */
6118 generator?: GeneratorOptionsByModuleType;
6119
6120 /**
6121 * Don't parse files matching. It's matched against the full resolved request.
6122 */
6123 noParse?: string | Function | RegExp | (string | Function | RegExp)[];
6124
6125 /**
6126 * Specify options for each parser.
6127 */
6128 parser?: ParserOptionsByModuleType;
6129
6130 /**
6131 * An array of rules applied for modules.
6132 */
6133 rules?: (RuleSetRule | "...")[];
6134
6135 /**
6136 * Emit errors instead of warnings when imported names don't exist in imported module. Deprecated: This option has moved to 'module.parser.javascript.strictExportPresence'.
6137 */
6138 strictExportPresence?: boolean;
6139
6140 /**
6141 * Handle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to 'module.parser.javascript.strictThisContextOnImports'.
6142 */
6143 strictThisContextOnImports?: boolean;
6144
6145 /**
6146 * Enable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextCritical'.
6147 */
6148 unknownContextCritical?: boolean;
6149
6150 /**
6151 * Enable recursive directory lookup when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRecursive'.
6152 */
6153 unknownContextRecursive?: boolean;
6154
6155 /**
6156 * Sets the regular expression when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRegExp'.
6157 */
6158 unknownContextRegExp?: boolean | RegExp;
6159
6160 /**
6161 * Sets the request when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRequest'.
6162 */
6163 unknownContextRequest?: string;
6164
6165 /**
6166 * Cache the resolving of module requests.
6167 */
6168 unsafeCache?: boolean | Function;
6169
6170 /**
6171 * Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextCritical'.
6172 */
6173 wrappedContextCritical?: boolean;
6174
6175 /**
6176 * Enable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRecursive'.
6177 */
6178 wrappedContextRecursive?: boolean;
6179
6180 /**
6181 * Set the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRegExp'.
6182 */
6183 wrappedContextRegExp?: RegExp;
6184}
6185
6186/**
6187 * Options affecting the normal modules (`NormalModuleFactory`).
6188 */
6189declare interface ModuleOptionsNormalized {
6190 /**
6191 * An array of rules applied by default for modules.
6192 */
6193 defaultRules: (RuleSetRule | "...")[];
6194
6195 /**
6196 * Specify options for each generator.
6197 */
6198 generator: GeneratorOptionsByModuleType;
6199
6200 /**
6201 * Don't parse files matching. It's matched against the full resolved request.
6202 */
6203 noParse?: string | Function | RegExp | (string | Function | RegExp)[];
6204
6205 /**
6206 * Specify options for each parser.
6207 */
6208 parser: ParserOptionsByModuleType;
6209
6210 /**
6211 * An array of rules applied for modules.
6212 */
6213 rules: (RuleSetRule | "...")[];
6214
6215 /**
6216 * Cache the resolving of module requests.
6217 */
6218 unsafeCache?: boolean | Function;
6219}
6220declare interface ModulePathData {
6221 id: string | number;
6222 hash: string;
6223 hashWithLength?: (arg0: number) => string;
6224}
6225declare abstract class ModuleProfile {
6226 startTime: number;
6227 factoryStartTime: number;
6228 factoryEndTime: number;
6229 factory: number;
6230 factoryParallelismFactor: number;
6231 restoringStartTime: number;
6232 restoringEndTime: number;
6233 restoring: number;
6234 restoringParallelismFactor: number;
6235 integrationStartTime: number;
6236 integrationEndTime: number;
6237 integration: number;
6238 integrationParallelismFactor: number;
6239 buildingStartTime: number;
6240 buildingEndTime: number;
6241 building: number;
6242 buildingParallelismFactor: number;
6243 storingStartTime: number;
6244 storingEndTime: number;
6245 storing: number;
6246 storingParallelismFactor: number;
6247 additionalFactoryTimes: any;
6248 additionalFactories: number;
6249 additionalFactoriesParallelismFactor: number;
6250 additionalIntegration: number;
6251 markFactoryStart(): void;
6252 markFactoryEnd(): void;
6253 markRestoringStart(): void;
6254 markRestoringEnd(): void;
6255 markIntegrationStart(): void;
6256 markIntegrationEnd(): void;
6257 markBuildingStart(): void;
6258 markBuildingEnd(): void;
6259 markStoringStart(): void;
6260 markStoringEnd(): void;
6261
6262 /**
6263 * Merge this profile into another one
6264 */
6265 mergeInto(realProfile: ModuleProfile): void;
6266}
6267declare interface ModuleReferenceOptions {
6268 /**
6269 * the properties/exports of the module
6270 */
6271 ids: string[];
6272
6273 /**
6274 * true, when this referenced export is called
6275 */
6276 call: boolean;
6277
6278 /**
6279 * true, when this referenced export is directly imported (not via property access)
6280 */
6281 directImport: boolean;
6282
6283 /**
6284 * if the position is ASI safe or unknown
6285 */
6286 asiSafe?: boolean;
6287}
6288declare abstract class ModuleTemplate {
6289 type: string;
6290 hooks: Readonly<{
6291 content: { tap: (options?: any, fn?: any) => void };
6292 module: { tap: (options?: any, fn?: any) => void };
6293 render: { tap: (options?: any, fn?: any) => void };
6294 package: { tap: (options?: any, fn?: any) => void };
6295 hash: { tap: (options?: any, fn?: any) => void };
6296 }>;
6297 readonly runtimeTemplate: any;
6298}
6299declare class MultiCompiler {
6300 constructor(
6301 compilers: Compiler[] | Record<string, Compiler>,
6302 options: MultiCompilerOptions
6303 );
6304 hooks: Readonly<{
6305 done: SyncHook<[MultiStats]>;
6306 invalid: MultiHook<SyncHook<[null | string, number]>>;
6307 run: MultiHook<AsyncSeriesHook<[Compiler]>>;
6308 watchClose: SyncHook<[]>;
6309 watchRun: MultiHook<AsyncSeriesHook<[Compiler]>>;
6310 infrastructureLog: MultiHook<SyncBailHook<[string, string, any[]], true>>;
6311 }>;
6312 compilers: Compiler[];
6313 dependencies: WeakMap<Compiler, string[]>;
6314 running: boolean;
6315 readonly options: WebpackOptionsNormalized[] & MultiCompilerOptions;
6316 readonly outputPath: string;
6317 inputFileSystem: InputFileSystem;
6318 outputFileSystem: OutputFileSystem;
6319 watchFileSystem: WatchFileSystem;
6320 intermediateFileSystem: IntermediateFileSystem;
6321 getInfrastructureLogger(name?: any): WebpackLogger;
6322 setDependencies(compiler: Compiler, dependencies: string[]): void;
6323 validateDependencies(callback: CallbackFunction<MultiStats>): boolean;
6324 runWithDependencies(
6325 compilers: Compiler[],
6326 fn: (compiler: Compiler, callback: CallbackFunction<MultiStats>) => any,
6327 callback: CallbackFunction<MultiStats>
6328 ): void;
6329 watch(
6330 watchOptions: WatchOptions | WatchOptions[],
6331 handler: CallbackFunction<MultiStats>
6332 ): MultiWatching;
6333 run(callback: CallbackFunction<MultiStats>): void;
6334 purgeInputFileSystem(): void;
6335 close(callback: CallbackFunction<void>): void;
6336}
6337declare interface MultiCompilerOptions {
6338 /**
6339 * how many Compilers are allows to run at the same time in parallel
6340 */
6341 parallelism?: number;
6342}
6343declare abstract class MultiStats {
6344 stats: Stats[];
6345 readonly hash: string;
6346 hasErrors(): boolean;
6347 hasWarnings(): boolean;
6348 toJson(options?: any): StatsCompilation;
6349 toString(options?: any): string;
6350}
6351declare abstract class MultiWatching {
6352 watchings: Watching[];
6353 compiler: MultiCompiler;
6354 invalidate(callback?: any): void;
6355 suspend(): void;
6356 resume(): void;
6357 close(callback: CallbackFunction<void>): void;
6358}
6359declare class NamedChunkIdsPlugin {
6360 constructor(options?: any);
6361 delimiter: any;
6362 context: any;
6363
6364 /**
6365 * Apply the plugin
6366 */
6367 apply(compiler: Compiler): void;
6368}
6369declare class NamedModuleIdsPlugin {
6370 constructor(options?: any);
6371 options: any;
6372
6373 /**
6374 * Apply the plugin
6375 */
6376 apply(compiler: Compiler): void;
6377}
6378declare class NaturalModuleIdsPlugin {
6379 constructor();
6380
6381 /**
6382 * Apply the plugin
6383 */
6384 apply(compiler: Compiler): void;
6385}
6386declare interface NeedBuildContext {
6387 fileSystemInfo: FileSystemInfo;
6388}
6389declare class NoEmitOnErrorsPlugin {
6390 constructor();
6391
6392 /**
6393 * Apply the plugin
6394 */
6395 apply(compiler: Compiler): void;
6396}
6397declare class NodeEnvironmentPlugin {
6398 constructor(options?: any);
6399 options: any;
6400
6401 /**
6402 * Apply the plugin
6403 */
6404 apply(compiler: Compiler): void;
6405}
6406type NodeEstreeIndex =
6407 | UnaryExpression
6408 | ThisExpression
6409 | ArrayExpression
6410 | ObjectExpression
6411 | FunctionExpression
6412 | ArrowFunctionExpression
6413 | YieldExpression
6414 | SimpleLiteral
6415 | RegExpLiteral
6416 | UpdateExpression
6417 | BinaryExpression
6418 | AssignmentExpression
6419 | LogicalExpression
6420 | MemberExpression
6421 | ConditionalExpression
6422 | SimpleCallExpression
6423 | NewExpression
6424 | SequenceExpression
6425 | TemplateLiteral
6426 | TaggedTemplateExpression
6427 | ClassExpression
6428 | MetaProperty
6429 | Identifier
6430 | AwaitExpression
6431 | ImportExpression
6432 | ChainExpression
6433 | FunctionDeclaration
6434 | VariableDeclaration
6435 | ClassDeclaration
6436 | ExpressionStatement
6437 | BlockStatement
6438 | EmptyStatement
6439 | DebuggerStatement
6440 | WithStatement
6441 | ReturnStatement
6442 | LabeledStatement
6443 | BreakStatement
6444 | ContinueStatement
6445 | IfStatement
6446 | SwitchStatement
6447 | ThrowStatement
6448 | TryStatement
6449 | WhileStatement
6450 | DoWhileStatement
6451 | ForStatement
6452 | ForInStatement
6453 | ForOfStatement
6454 | ImportDeclaration
6455 | ExportNamedDeclaration
6456 | ExportDefaultDeclaration
6457 | ExportAllDeclaration
6458 | MethodDefinition
6459 | VariableDeclarator
6460 | Program
6461 | Super
6462 | SwitchCase
6463 | CatchClause
6464 | Property
6465 | AssignmentProperty
6466 | TemplateElement
6467 | SpreadElement
6468 | ObjectPattern
6469 | ArrayPattern
6470 | RestElement
6471 | AssignmentPattern
6472 | ClassBody
6473 | ImportSpecifier
6474 | ImportDefaultSpecifier
6475 | ImportNamespaceSpecifier
6476 | ExportSpecifier;
6477
6478/**
6479 * Options object for node compatibility features.
6480 */
6481declare interface NodeOptions {
6482 /**
6483 * Include a polyfill for the '__dirname' variable.
6484 */
6485 __dirname?: boolean | "mock" | "eval-only";
6486
6487 /**
6488 * Include a polyfill for the '__filename' variable.
6489 */
6490 __filename?: boolean | "mock" | "eval-only";
6491
6492 /**
6493 * Include a polyfill for the 'global' variable.
6494 */
6495 global?: boolean;
6496}
6497declare class NodeSourcePlugin {
6498 constructor();
6499
6500 /**
6501 * Apply the plugin
6502 */
6503 apply(compiler: Compiler): void;
6504}
6505declare class NodeTargetPlugin {
6506 constructor();
6507
6508 /**
6509 * Apply the plugin
6510 */
6511 apply(compiler: Compiler): void;
6512}
6513declare class NodeTemplatePlugin {
6514 constructor(options?: any);
6515
6516 /**
6517 * Apply the plugin
6518 */
6519 apply(compiler: Compiler): void;
6520}
6521type NodeWebpackOptions = false | NodeOptions;
6522declare class NormalModule extends Module {
6523 constructor(__0: {
6524 /**
6525 * an optional layer in which the module is
6526 */
6527 layer?: string;
6528 /**
6529 * module type
6530 */
6531 type: string;
6532 /**
6533 * request string
6534 */
6535 request: string;
6536 /**
6537 * request intended by user (without loaders from config)
6538 */
6539 userRequest: string;
6540 /**
6541 * request without resolving
6542 */
6543 rawRequest: string;
6544 /**
6545 * list of loaders
6546 */
6547 loaders: LoaderItem[];
6548 /**
6549 * path + query of the real resource
6550 */
6551 resource: string;
6552 /**
6553 * path + query of the matched resource (virtual)
6554 */
6555 matchResource?: string;
6556 /**
6557 * the parser used
6558 */
6559 parser: Parser;
6560 /**
6561 * the generator used
6562 */
6563 generator: Generator;
6564 /**
6565 * options used for resolving requests from this module
6566 */
6567 resolveOptions: Object;
6568 });
6569 request: string;
6570 userRequest: string;
6571 rawRequest: string;
6572 binary: boolean;
6573 parser: Parser;
6574 generator: Generator;
6575 resource: string;
6576 matchResource?: string;
6577 loaders: LoaderItem[];
6578 error?: WebpackError;
6579 createSourceForAsset(
6580 context: string,
6581 name: string,
6582 content: string,
6583 sourceMap?: any,
6584 associatedObjectForCache?: Object
6585 ): Source;
6586 createLoaderContext(
6587 resolver: ResolverWithOptions,
6588 options: WebpackOptionsNormalized,
6589 compilation: Compilation,
6590 fs: InputFileSystem
6591 ): any;
6592 getCurrentLoader(loaderContext?: any, index?: any): null | LoaderItem;
6593 createSource(
6594 context: string,
6595 content: string | Buffer,
6596 sourceMap?: any,
6597 associatedObjectForCache?: Object
6598 ): Source;
6599 doBuild(
6600 options: WebpackOptionsNormalized,
6601 compilation: Compilation,
6602 resolver: ResolverWithOptions,
6603 fs: InputFileSystem,
6604 callback: (arg0?: WebpackError) => void
6605 ): void;
6606 markModuleAsErrored(error: WebpackError): void;
6607 applyNoParseRule(rule?: any, content?: any): any;
6608 shouldPreventParsing(noParseRule?: any, request?: any): any;
6609 static getCompilationHooks(
6610 compilation: Compilation
6611 ): NormalModuleCompilationHooks;
6612 static deserialize(context?: any): NormalModule;
6613}
6614declare interface NormalModuleCompilationHooks {
6615 loader: SyncHook<[object, NormalModule]>;
6616 beforeLoaders: SyncHook<[LoaderItem[], NormalModule, object]>;
6617 readResourceForScheme: HookMap<
6618 AsyncSeriesBailHook<[string, NormalModule], string | Buffer>
6619 >;
6620}
6621declare abstract class NormalModuleFactory extends ModuleFactory {
6622 hooks: Readonly<{
6623 resolve: AsyncSeriesBailHook<[ResolveData], any>;
6624 resolveForScheme: HookMap<
6625 AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
6626 >;
6627 factorize: AsyncSeriesBailHook<[ResolveData], any>;
6628 beforeResolve: AsyncSeriesBailHook<[ResolveData], any>;
6629 afterResolve: AsyncSeriesBailHook<[ResolveData], any>;
6630 createModule: AsyncSeriesBailHook<[Object, ResolveData], any>;
6631 module: SyncWaterfallHook<[Module, Object, ResolveData], any>;
6632 createParser: HookMap<SyncBailHook<any, any>>;
6633 parser: HookMap<SyncHook<any>>;
6634 createGenerator: HookMap<SyncBailHook<any, any>>;
6635 generator: HookMap<SyncHook<any>>;
6636 }>;
6637 resolverFactory: ResolverFactory;
6638 ruleSet: RuleSet;
6639 unsafeCache: boolean;
6640 cachePredicate: Function;
6641 context: string;
6642 fs: InputFileSystem;
6643 parserCache: Map<string, WeakMap<Object, any>>;
6644 generatorCache: Map<string, WeakMap<Object, Generator>>;
6645 resolveResource(
6646 contextInfo?: any,
6647 context?: any,
6648 unresolvedResource?: any,
6649 resolver?: any,
6650 resolveContext?: any,
6651 callback?: any
6652 ): void;
6653 resolveRequestArray(
6654 contextInfo?: any,
6655 context?: any,
6656 array?: any,
6657 resolver?: any,
6658 resolveContext?: any,
6659 callback?: any
6660 ): any;
6661 getParser(type?: any, parserOptions?: object): any;
6662 createParser(type: string, parserOptions?: { [index: string]: any }): Parser;
6663 getGenerator(type?: any, generatorOptions?: object): undefined | Generator;
6664 createGenerator(type?: any, generatorOptions?: object): any;
6665 getResolver(type?: any, resolveOptions?: any): ResolverWithOptions;
6666}
6667declare class NormalModuleReplacementPlugin {
6668 /**
6669 * Create an instance of the plugin
6670 */
6671 constructor(
6672 resourceRegExp: RegExp,
6673 newResource: string | ((arg0?: any) => void)
6674 );
6675 resourceRegExp: RegExp;
6676 newResource: string | ((arg0?: any) => void);
6677
6678 /**
6679 * Apply the plugin
6680 */
6681 apply(compiler: Compiler): void;
6682}
6683type NormalizedStatsOptions = KnownNormalizedStatsOptions &
6684 Omit<
6685 StatsOptions,
6686 | "context"
6687 | "requestShortener"
6688 | "chunkGroups"
6689 | "chunksSort"
6690 | "modulesSort"
6691 | "chunkModulesSort"
6692 | "nestedModulesSort"
6693 | "assetsSort"
6694 | "ids"
6695 | "cachedAssets"
6696 | "groupAssetsByEmitStatus"
6697 | "groupAssetsByPath"
6698 | "groupAssetsByExtension"
6699 | "assetsSpace"
6700 | "excludeAssets"
6701 | "excludeModules"
6702 | "warningsFilter"
6703 | "cachedModules"
6704 | "orphanModules"
6705 | "dependentModules"
6706 | "runtimeModules"
6707 | "groupModulesByCacheStatus"
6708 | "groupModulesByLayer"
6709 | "groupModulesByAttributes"
6710 | "groupModulesByPath"
6711 | "groupModulesByExtension"
6712 | "groupModulesByType"
6713 | "entrypoints"
6714 | "chunkGroupAuxiliary"
6715 | "chunkGroupChildren"
6716 | "chunkGroupMaxAssets"
6717 | "modulesSpace"
6718 | "chunkModulesSpace"
6719 | "nestedModulesSpace"
6720 | "logging"
6721 | "loggingDebug"
6722 | "loggingTrace"
6723 | "_env"
6724 > &
6725 Record<string, any>;
6726declare interface ObjectDeserializerContext {
6727 read: () => any;
6728}
6729declare interface ObjectSerializer {
6730 serialize: (arg0: any, arg1: ObjectSerializerContext) => void;
6731 deserialize: (arg0: ObjectDeserializerContext) => any;
6732}
6733declare interface ObjectSerializerContext {
6734 write: (arg0?: any) => void;
6735}
6736declare class OccurrenceChunkIdsPlugin {
6737 constructor(options?: OccurrenceChunkIdsPluginOptions);
6738 options: OccurrenceChunkIdsPluginOptions;
6739
6740 /**
6741 * Apply the plugin
6742 */
6743 apply(compiler: Compiler): void;
6744}
6745declare interface OccurrenceChunkIdsPluginOptions {
6746 /**
6747 * Prioritise initial size over total size.
6748 */
6749 prioritiseInitial?: boolean;
6750}
6751declare class OccurrenceModuleIdsPlugin {
6752 constructor(options?: OccurrenceModuleIdsPluginOptions);
6753 options: OccurrenceModuleIdsPluginOptions;
6754
6755 /**
6756 * Apply the plugin
6757 */
6758 apply(compiler: Compiler): void;
6759}
6760declare interface OccurrenceModuleIdsPluginOptions {
6761 /**
6762 * Prioritise initial size over total size.
6763 */
6764 prioritiseInitial?: boolean;
6765}
6766
6767/**
6768 * Enables/Disables integrated optimizations.
6769 */
6770declare interface Optimization {
6771 /**
6772 * Check for incompatible wasm types when importing/exporting from/to ESM.
6773 */
6774 checkWasmTypes?: boolean;
6775
6776 /**
6777 * Define the algorithm to choose chunk ids (named: readable ids for better debugging, deterministic: numeric hash 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).
6778 */
6779 chunkIds?:
6780 | false
6781 | "natural"
6782 | "named"
6783 | "deterministic"
6784 | "size"
6785 | "total-size";
6786
6787 /**
6788 * Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer.
6789 */
6790 concatenateModules?: boolean;
6791
6792 /**
6793 * Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime.
6794 */
6795 emitOnErrors?: boolean;
6796
6797 /**
6798 * Also flag chunks as loaded which contain a subset of the modules.
6799 */
6800 flagIncludedChunks?: boolean;
6801
6802 /**
6803 * Creates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection.
6804 */
6805 innerGraph?: boolean;
6806
6807 /**
6808 * Rename exports when possible to generate shorter code (depends on optimization.usedExports and optimization.providedExports, true/"deterministic": generate short deterministic names optimized for caching, "size": generate the shortest possible names).
6809 */
6810 mangleExports?: boolean | "deterministic" | "size";
6811
6812 /**
6813 * Reduce size of WASM by changing imports to shorter strings.
6814 */
6815 mangleWasmImports?: boolean;
6816
6817 /**
6818 * Merge chunks which contain the same modules.
6819 */
6820 mergeDuplicateChunks?: boolean;
6821
6822 /**
6823 * Enable minimizing the output. Uses optimization.minimizer.
6824 */
6825 minimize?: boolean;
6826
6827 /**
6828 * Minimizer(s) to use for minimizing the output.
6829 */
6830 minimizer?: (
6831 | ((this: Compiler, compiler: Compiler) => void)
6832 | WebpackPluginInstance
6833 | "..."
6834 )[];
6835
6836 /**
6837 * Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: (deprecated) short hashes as ids for better long term caching, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, false: no algorithm used, as custom one can be provided via plugin).
6838 */
6839 moduleIds?: false | "natural" | "named" | "deterministic" | "size" | "hashed";
6840
6841 /**
6842 * Avoid emitting assets when errors occur (deprecated: use 'emitOnErrors' instead).
6843 */
6844 noEmitOnErrors?: boolean;
6845
6846 /**
6847 * Set process.env.NODE_ENV to a specific value.
6848 */
6849 nodeEnv?: string | false;
6850
6851 /**
6852 * Generate records with relative paths to be able to move the context folder.
6853 */
6854 portableRecords?: boolean;
6855
6856 /**
6857 * Figure out which exports are provided by modules to generate more efficient code.
6858 */
6859 providedExports?: boolean;
6860
6861 /**
6862 * Use real [contenthash] based on final content of the assets.
6863 */
6864 realContentHash?: boolean;
6865
6866 /**
6867 * Removes modules from chunks when these modules are already included in all parents.
6868 */
6869 removeAvailableModules?: boolean;
6870
6871 /**
6872 * Remove chunks which are empty.
6873 */
6874 removeEmptyChunks?: boolean;
6875
6876 /**
6877 * Create an additional chunk which contains only the webpack runtime and chunk hash maps.
6878 */
6879 runtimeChunk?:
6880 | boolean
6881 | "single"
6882 | "multiple"
6883 | {
6884 /**
6885 * The name or name factory for the runtime chunks.
6886 */
6887 name?: string | Function;
6888 };
6889
6890 /**
6891 * Skip over modules which contain no side effects when exports are not used (false: disabled, 'flag': only use manually placed side effects flag, true: also analyse source code for side effects).
6892 */
6893 sideEffects?: boolean | "flag";
6894
6895 /**
6896 * Optimize duplication and caching by splitting chunks by shared modules and cache group.
6897 */
6898 splitChunks?: false | OptimizationSplitChunksOptions;
6899
6900 /**
6901 * Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code (true: analyse used exports for each runtime, "global": analyse exports globally for all runtimes combined).
6902 */
6903 usedExports?: boolean | "global";
6904}
6905
6906/**
6907 * Options object for describing behavior of a cache group selecting modules that should be cached together.
6908 */
6909declare interface OptimizationSplitChunksCacheGroup {
6910 /**
6911 * Sets the name delimiter for created chunks.
6912 */
6913 automaticNameDelimiter?: string;
6914
6915 /**
6916 * Select chunks for determining cache group content (defaults to "initial", "initial" and "all" requires adding these chunks to the HTML).
6917 */
6918 chunks?: "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
6919
6920 /**
6921 * Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group.
6922 */
6923 enforce?: boolean;
6924
6925 /**
6926 * Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.
6927 */
6928 enforceSizeThreshold?: number | { [index: string]: number };
6929
6930 /**
6931 * Sets the template for the filename for created chunks.
6932 */
6933 filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
6934
6935 /**
6936 * Sets the hint for chunk id.
6937 */
6938 idHint?: string;
6939
6940 /**
6941 * Assign modules to a cache group by module layer.
6942 */
6943 layer?: string | Function | RegExp;
6944
6945 /**
6946 * Maximum number of requests which are accepted for on-demand loading.
6947 */
6948 maxAsyncRequests?: number;
6949
6950 /**
6951 * Maximal size hint for the on-demand chunks.
6952 */
6953 maxAsyncSize?: number | { [index: string]: number };
6954
6955 /**
6956 * Maximum number of initial chunks which are accepted for an entry point.
6957 */
6958 maxInitialRequests?: number;
6959
6960 /**
6961 * Maximal size hint for the initial chunks.
6962 */
6963 maxInitialSize?: number | { [index: string]: number };
6964
6965 /**
6966 * Maximal size hint for the created chunks.
6967 */
6968 maxSize?: number | { [index: string]: number };
6969
6970 /**
6971 * Minimum number of times a module has to be duplicated until it's considered for splitting.
6972 */
6973 minChunks?: number;
6974
6975 /**
6976 * Minimal size for the chunks the stay after moving the modules to a new chunk.
6977 */
6978 minRemainingSize?: number | { [index: string]: number };
6979
6980 /**
6981 * Minimal size for the created chunk.
6982 */
6983 minSize?: number | { [index: string]: number };
6984
6985 /**
6986 * Give chunks for this cache group a name (chunks with equal name are merged).
6987 */
6988 name?: string | false | Function;
6989
6990 /**
6991 * Priority of this cache group.
6992 */
6993 priority?: number;
6994
6995 /**
6996 * Try to reuse existing chunk (with name) when it has matching modules.
6997 */
6998 reuseExistingChunk?: boolean;
6999
7000 /**
7001 * Assign modules to a cache group by module name.
7002 */
7003 test?: string | Function | RegExp;
7004
7005 /**
7006 * Assign modules to a cache group by module type.
7007 */
7008 type?: string | Function | RegExp;
7009
7010 /**
7011 * Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.
7012 */
7013 usedExports?: boolean;
7014}
7015
7016/**
7017 * Options object for splitting chunks into smaller chunks.
7018 */
7019declare interface OptimizationSplitChunksOptions {
7020 /**
7021 * Sets the name delimiter for created chunks.
7022 */
7023 automaticNameDelimiter?: string;
7024
7025 /**
7026 * Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks, default categories: 'default', 'defaultVendors').
7027 */
7028 cacheGroups?: {
7029 [index: string]:
7030 | string
7031 | false
7032 | Function
7033 | RegExp
7034 | OptimizationSplitChunksCacheGroup;
7035 };
7036
7037 /**
7038 * Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).
7039 */
7040 chunks?: "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
7041
7042 /**
7043 * Sets the size types which are used when a number is used for sizes.
7044 */
7045 defaultSizeTypes?: string[];
7046
7047 /**
7048 * Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.
7049 */
7050 enforceSizeThreshold?: number | { [index: string]: number };
7051
7052 /**
7053 * Options for modules not selected by any other cache group.
7054 */
7055 fallbackCacheGroup?: {
7056 /**
7057 * Sets the name delimiter for created chunks.
7058 */
7059 automaticNameDelimiter?: string;
7060 /**
7061 * Maximal size hint for the on-demand chunks.
7062 */
7063 maxAsyncSize?: number | { [index: string]: number };
7064 /**
7065 * Maximal size hint for the initial chunks.
7066 */
7067 maxInitialSize?: number | { [index: string]: number };
7068 /**
7069 * Maximal size hint for the created chunks.
7070 */
7071 maxSize?: number | { [index: string]: number };
7072 /**
7073 * Minimal size for the created chunk.
7074 */
7075 minSize?: number | { [index: string]: number };
7076 };
7077
7078 /**
7079 * Sets the template for the filename for created chunks.
7080 */
7081 filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
7082
7083 /**
7084 * Prevents exposing path info when creating names for parts splitted by maxSize.
7085 */
7086 hidePathInfo?: boolean;
7087
7088 /**
7089 * Maximum number of requests which are accepted for on-demand loading.
7090 */
7091 maxAsyncRequests?: number;
7092
7093 /**
7094 * Maximal size hint for the on-demand chunks.
7095 */
7096 maxAsyncSize?: number | { [index: string]: number };
7097
7098 /**
7099 * Maximum number of initial chunks which are accepted for an entry point.
7100 */
7101 maxInitialRequests?: number;
7102
7103 /**
7104 * Maximal size hint for the initial chunks.
7105 */
7106 maxInitialSize?: number | { [index: string]: number };
7107
7108 /**
7109 * Maximal size hint for the created chunks.
7110 */
7111 maxSize?: number | { [index: string]: number };
7112
7113 /**
7114 * Minimum number of times a module has to be duplicated until it's considered for splitting.
7115 */
7116 minChunks?: number;
7117
7118 /**
7119 * Minimal size for the chunks the stay after moving the modules to a new chunk.
7120 */
7121 minRemainingSize?: number | { [index: string]: number };
7122
7123 /**
7124 * Minimal size for the created chunks.
7125 */
7126 minSize?: number | { [index: string]: number };
7127
7128 /**
7129 * Give chunks created a name (chunks with equal name are merged).
7130 */
7131 name?: string | false | Function;
7132
7133 /**
7134 * Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.
7135 */
7136 usedExports?: boolean;
7137}
7138declare abstract class OptionsApply {
7139 process(options?: any, compiler?: any): void;
7140}
7141declare interface OriginRecord {
7142 module: Module;
7143 loc: DependencyLocation;
7144 request: string;
7145}
7146declare class OriginalSource extends Source {
7147 constructor(source: string | Buffer, name: string);
7148 getName(): string;
7149}
7150
7151/**
7152 * Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
7153 */
7154declare interface Output {
7155 /**
7156 * The filename of asset modules as relative path inside the 'output.path' directory.
7157 */
7158 assetModuleFilename?:
7159 | string
7160 | ((pathData: PathData, assetInfo?: AssetInfo) => string);
7161
7162 /**
7163 * Add a comment in the UMD wrapper.
7164 */
7165 auxiliaryComment?: string | LibraryCustomUmdCommentObject;
7166
7167 /**
7168 * Add charset attribute for script tag.
7169 */
7170 charset?: boolean;
7171
7172 /**
7173 * Specifies the filename template of output files of non-initial chunks on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
7174 */
7175 chunkFilename?:
7176 | string
7177 | ((pathData: PathData, assetInfo?: AssetInfo) => string);
7178
7179 /**
7180 * The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), but others might be added by plugins).
7181 */
7182 chunkFormat?: string | false;
7183
7184 /**
7185 * Number of milliseconds before chunk request expires.
7186 */
7187 chunkLoadTimeout?: number;
7188
7189 /**
7190 * The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
7191 */
7192 chunkLoading?: string | false;
7193
7194 /**
7195 * The global variable used by webpack for loading of chunks.
7196 */
7197 chunkLoadingGlobal?: string;
7198
7199 /**
7200 * Clean the output directory before emit.
7201 */
7202 clean?: boolean | CleanOptions;
7203
7204 /**
7205 * Check if to be emitted file already exists and have the same content before writing to output filesystem.
7206 */
7207 compareBeforeEmit?: boolean;
7208
7209 /**
7210 * This option enables cross-origin loading of chunks.
7211 */
7212 crossOriginLoading?: false | "anonymous" | "use-credentials";
7213
7214 /**
7215 * Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
7216 */
7217 devtoolFallbackModuleFilenameTemplate?: string | Function;
7218
7219 /**
7220 * Filename template string of function for the sources array in a generated SourceMap.
7221 */
7222 devtoolModuleFilenameTemplate?: string | Function;
7223
7224 /**
7225 * 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.
7226 */
7227 devtoolNamespace?: string;
7228
7229 /**
7230 * List of chunk loading types enabled for use by entry points.
7231 */
7232 enabledChunkLoadingTypes?: string[];
7233
7234 /**
7235 * List of library types enabled for use by entry points.
7236 */
7237 enabledLibraryTypes?: string[];
7238
7239 /**
7240 * List of wasm loading types enabled for use by entry points.
7241 */
7242 enabledWasmLoadingTypes?: string[];
7243
7244 /**
7245 * The abilities of the environment where the webpack generated code should run.
7246 */
7247 environment?: Environment;
7248
7249 /**
7250 * Specifies the filename of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
7251 */
7252 filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
7253
7254 /**
7255 * An expression which is used to address the global object/scope in runtime code.
7256 */
7257 globalObject?: string;
7258
7259 /**
7260 * Digest type used for the hash.
7261 */
7262 hashDigest?: string;
7263
7264 /**
7265 * Number of chars which are used for the hash.
7266 */
7267 hashDigestLength?: number;
7268
7269 /**
7270 * Algorithm used for generation the hash (see node.js crypto package).
7271 */
7272 hashFunction?: string | typeof Hash;
7273
7274 /**
7275 * Any string which is added to the hash to salt it.
7276 */
7277 hashSalt?: string;
7278
7279 /**
7280 * The filename of the Hot Update Chunks. They are inside the output.path directory.
7281 */
7282 hotUpdateChunkFilename?: string;
7283
7284 /**
7285 * The global variable used by webpack for loading of hot update chunks.
7286 */
7287 hotUpdateGlobal?: string;
7288
7289 /**
7290 * The filename of the Hot Update Main File. It is inside the 'output.path' directory.
7291 */
7292 hotUpdateMainFilename?: string;
7293
7294 /**
7295 * Wrap javascript code into IIFE's to avoid leaking into global scope.
7296 */
7297 iife?: boolean;
7298
7299 /**
7300 * The name of the native import() function (can be exchanged for a polyfill).
7301 */
7302 importFunctionName?: string;
7303
7304 /**
7305 * The name of the native import.meta object (can be exchanged for a polyfill).
7306 */
7307 importMetaName?: string;
7308
7309 /**
7310 * Make the output files a library, exporting the exports of the entry point.
7311 */
7312 library?: string | string[] | LibraryOptions | LibraryCustomUmdObject;
7313
7314 /**
7315 * Specify which export should be exposed as library.
7316 */
7317 libraryExport?: string | string[];
7318
7319 /**
7320 * Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
7321 */
7322 libraryTarget?: string;
7323
7324 /**
7325 * Output javascript files as module source type.
7326 */
7327 module?: boolean;
7328
7329 /**
7330 * The output directory as **absolute path** (required).
7331 */
7332 path?: string;
7333
7334 /**
7335 * Include comments with information about the modules.
7336 */
7337 pathinfo?: boolean | "verbose";
7338
7339 /**
7340 * The `publicPath` specifies the public URL address of the output files when referenced in a browser.
7341 */
7342 publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
7343
7344 /**
7345 * This option enables loading async chunks via a custom script type, such as script type="module".
7346 */
7347 scriptType?: false | "module" | "text/javascript";
7348
7349 /**
7350 * The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory.
7351 */
7352 sourceMapFilename?: string;
7353
7354 /**
7355 * Prefixes every line of the source in the bundle with this string.
7356 */
7357 sourcePrefix?: string;
7358
7359 /**
7360 * Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec.
7361 */
7362 strictModuleErrorHandling?: boolean;
7363
7364 /**
7365 * Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.
7366 */
7367 strictModuleExceptionHandling?: boolean;
7368
7369 /**
7370 * If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.
7371 */
7372 umdNamedDefine?: boolean;
7373
7374 /**
7375 * A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.
7376 */
7377 uniqueName?: string;
7378
7379 /**
7380 * The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
7381 */
7382 wasmLoading?: string | false;
7383
7384 /**
7385 * The filename of WebAssembly modules as relative path inside the 'output.path' directory.
7386 */
7387 webassemblyModuleFilename?: string;
7388
7389 /**
7390 * The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
7391 */
7392 workerChunkLoading?: string | false;
7393
7394 /**
7395 * The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
7396 */
7397 workerWasmLoading?: string | false;
7398}
7399declare interface OutputFileSystem {
7400 writeFile: (
7401 arg0: string,
7402 arg1: string | Buffer,
7403 arg2: (arg0?: NodeJS.ErrnoException) => void
7404 ) => void;
7405 mkdir: (arg0: string, arg1: (arg0?: NodeJS.ErrnoException) => void) => void;
7406 readdir?: (
7407 arg0: string,
7408 arg1: (
7409 arg0?: NodeJS.ErrnoException,
7410 arg1?: (string | Buffer)[] | IDirent[]
7411 ) => void
7412 ) => void;
7413 rmdir?: (arg0: string, arg1: (arg0?: NodeJS.ErrnoException) => void) => void;
7414 unlink?: (arg0: string, arg1: (arg0?: NodeJS.ErrnoException) => void) => void;
7415 stat: (
7416 arg0: string,
7417 arg1: (arg0?: NodeJS.ErrnoException, arg1?: IStats) => void
7418 ) => void;
7419 readFile: (
7420 arg0: string,
7421 arg1: (arg0?: NodeJS.ErrnoException, arg1?: string | Buffer) => void
7422 ) => void;
7423 join?: (arg0: string, arg1: string) => string;
7424 relative?: (arg0: string, arg1: string) => string;
7425 dirname?: (arg0: string) => string;
7426}
7427
7428/**
7429 * Normalized options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
7430 */
7431declare interface OutputNormalized {
7432 /**
7433 * The filename of asset modules as relative path inside the 'output.path' directory.
7434 */
7435 assetModuleFilename?:
7436 | string
7437 | ((pathData: PathData, assetInfo?: AssetInfo) => string);
7438
7439 /**
7440 * Add charset attribute for script tag.
7441 */
7442 charset?: boolean;
7443
7444 /**
7445 * Specifies the filename template of output files of non-initial chunks on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
7446 */
7447 chunkFilename?:
7448 | string
7449 | ((pathData: PathData, assetInfo?: AssetInfo) => string);
7450
7451 /**
7452 * The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), but others might be added by plugins).
7453 */
7454 chunkFormat?: string | false;
7455
7456 /**
7457 * Number of milliseconds before chunk request expires.
7458 */
7459 chunkLoadTimeout?: number;
7460
7461 /**
7462 * The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
7463 */
7464 chunkLoading?: string | false;
7465
7466 /**
7467 * The global variable used by webpack for loading of chunks.
7468 */
7469 chunkLoadingGlobal?: string;
7470
7471 /**
7472 * Clean the output directory before emit.
7473 */
7474 clean?: boolean | CleanOptions;
7475
7476 /**
7477 * Check if to be emitted file already exists and have the same content before writing to output filesystem.
7478 */
7479 compareBeforeEmit?: boolean;
7480
7481 /**
7482 * This option enables cross-origin loading of chunks.
7483 */
7484 crossOriginLoading?: false | "anonymous" | "use-credentials";
7485
7486 /**
7487 * Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
7488 */
7489 devtoolFallbackModuleFilenameTemplate?: string | Function;
7490
7491 /**
7492 * Filename template string of function for the sources array in a generated SourceMap.
7493 */
7494 devtoolModuleFilenameTemplate?: string | Function;
7495
7496 /**
7497 * 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.
7498 */
7499 devtoolNamespace?: string;
7500
7501 /**
7502 * List of chunk loading types enabled for use by entry points.
7503 */
7504 enabledChunkLoadingTypes?: string[];
7505
7506 /**
7507 * List of library types enabled for use by entry points.
7508 */
7509 enabledLibraryTypes?: string[];
7510
7511 /**
7512 * List of wasm loading types enabled for use by entry points.
7513 */
7514 enabledWasmLoadingTypes?: string[];
7515
7516 /**
7517 * The abilities of the environment where the webpack generated code should run.
7518 */
7519 environment?: Environment;
7520
7521 /**
7522 * Specifies the filename of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
7523 */
7524 filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
7525
7526 /**
7527 * An expression which is used to address the global object/scope in runtime code.
7528 */
7529 globalObject?: string;
7530
7531 /**
7532 * Digest type used for the hash.
7533 */
7534 hashDigest?: string;
7535
7536 /**
7537 * Number of chars which are used for the hash.
7538 */
7539 hashDigestLength?: number;
7540
7541 /**
7542 * Algorithm used for generation the hash (see node.js crypto package).
7543 */
7544 hashFunction?: string | typeof Hash;
7545
7546 /**
7547 * Any string which is added to the hash to salt it.
7548 */
7549 hashSalt?: string;
7550
7551 /**
7552 * The filename of the Hot Update Chunks. They are inside the output.path directory.
7553 */
7554 hotUpdateChunkFilename?: string;
7555
7556 /**
7557 * The global variable used by webpack for loading of hot update chunks.
7558 */
7559 hotUpdateGlobal?: string;
7560
7561 /**
7562 * The filename of the Hot Update Main File. It is inside the 'output.path' directory.
7563 */
7564 hotUpdateMainFilename?: string;
7565
7566 /**
7567 * Wrap javascript code into IIFE's to avoid leaking into global scope.
7568 */
7569 iife?: boolean;
7570
7571 /**
7572 * The name of the native import() function (can be exchanged for a polyfill).
7573 */
7574 importFunctionName?: string;
7575
7576 /**
7577 * The name of the native import.meta object (can be exchanged for a polyfill).
7578 */
7579 importMetaName?: string;
7580
7581 /**
7582 * Options for library.
7583 */
7584 library?: LibraryOptions;
7585
7586 /**
7587 * Output javascript files as module source type.
7588 */
7589 module?: boolean;
7590
7591 /**
7592 * The output directory as **absolute path** (required).
7593 */
7594 path?: string;
7595
7596 /**
7597 * Include comments with information about the modules.
7598 */
7599 pathinfo?: boolean | "verbose";
7600
7601 /**
7602 * The `publicPath` specifies the public URL address of the output files when referenced in a browser.
7603 */
7604 publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
7605
7606 /**
7607 * This option enables loading async chunks via a custom script type, such as script type="module".
7608 */
7609 scriptType?: false | "module" | "text/javascript";
7610
7611 /**
7612 * The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory.
7613 */
7614 sourceMapFilename?: string;
7615
7616 /**
7617 * Prefixes every line of the source in the bundle with this string.
7618 */
7619 sourcePrefix?: string;
7620
7621 /**
7622 * Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec.
7623 */
7624 strictModuleErrorHandling?: boolean;
7625
7626 /**
7627 * Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.
7628 */
7629 strictModuleExceptionHandling?: boolean;
7630
7631 /**
7632 * A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.
7633 */
7634 uniqueName?: string;
7635
7636 /**
7637 * The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
7638 */
7639 wasmLoading?: string | false;
7640
7641 /**
7642 * The filename of WebAssembly modules as relative path inside the 'output.path' directory.
7643 */
7644 webassemblyModuleFilename?: string;
7645
7646 /**
7647 * The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
7648 */
7649 workerChunkLoading?: string | false;
7650
7651 /**
7652 * The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
7653 */
7654 workerWasmLoading?: string | false;
7655}
7656declare interface ParameterizedComparator<TArg, T> {
7657 (arg0: TArg): Comparator<T>;
7658}
7659declare interface ParsedIdentifier {
7660 request: string;
7661 query: string;
7662 fragment: string;
7663 directory: boolean;
7664 module: boolean;
7665 file: boolean;
7666 internal: boolean;
7667}
7668declare class Parser {
7669 constructor();
7670 parse(
7671 source: string | Buffer | PreparsedAst,
7672 state: ParserState
7673 ): ParserState;
7674}
7675type ParserOptionsByModuleType = ParserOptionsByModuleTypeKnown &
7676 ParserOptionsByModuleTypeUnknown;
7677
7678/**
7679 * Specify options for each parser.
7680 */
7681declare interface ParserOptionsByModuleTypeKnown {
7682 /**
7683 * Parser options for asset modules.
7684 */
7685 asset?: AssetParserOptions;
7686
7687 /**
7688 * No parser options are supported for this module type.
7689 */
7690 "asset/inline"?: EmptyParserOptions;
7691
7692 /**
7693 * No parser options are supported for this module type.
7694 */
7695 "asset/resource"?: EmptyParserOptions;
7696
7697 /**
7698 * No parser options are supported for this module type.
7699 */
7700 "asset/source"?: EmptyParserOptions;
7701
7702 /**
7703 * Parser options for javascript modules.
7704 */
7705 javascript?: JavascriptParserOptions;
7706
7707 /**
7708 * Parser options for javascript modules.
7709 */
7710 "javascript/auto"?: JavascriptParserOptions;
7711
7712 /**
7713 * Parser options for javascript modules.
7714 */
7715 "javascript/dynamic"?: JavascriptParserOptions;
7716
7717 /**
7718 * Parser options for javascript modules.
7719 */
7720 "javascript/esm"?: JavascriptParserOptions;
7721}
7722
7723/**
7724 * Specify options for each parser.
7725 */
7726declare interface ParserOptionsByModuleTypeUnknown {
7727 [index: string]: { [index: string]: any };
7728}
7729type ParserState = Record<string, any> & ParserStateBase;
7730declare interface ParserStateBase {
7731 current: NormalModule;
7732 module: NormalModule;
7733 compilation: Compilation;
7734 options: { [index: string]: any };
7735}
7736declare interface PathData {
7737 chunkGraph?: ChunkGraph;
7738 hash?: string;
7739 hashWithLength?: (arg0: number) => string;
7740 chunk?: Chunk | ChunkPathData;
7741 module?: Module | ModulePathData;
7742 runtime?: RuntimeSpec;
7743 filename?: string;
7744 basename?: string;
7745 query?: string;
7746 contentHashType?: string;
7747 contentHash?: string;
7748 contentHashWithLength?: (arg0: number) => string;
7749 noChunkHash?: boolean;
7750 url?: string;
7751}
7752
7753/**
7754 * Configuration object for web performance recommendations.
7755 */
7756declare interface PerformanceOptions {
7757 /**
7758 * Filter function to select assets that are checked.
7759 */
7760 assetFilter?: Function;
7761
7762 /**
7763 * Sets the format of the hints: warnings, errors or nothing at all.
7764 */
7765 hints?: false | "error" | "warning";
7766
7767 /**
7768 * File size limit (in bytes) when exceeded, that webpack will provide performance hints.
7769 */
7770 maxAssetSize?: number;
7771
7772 /**
7773 * Total size of an entry point (in bytes).
7774 */
7775 maxEntrypointSize?: number;
7776}
7777type Plugin =
7778 | { apply: (arg0: Resolver) => void }
7779 | ((this: Resolver, arg1: Resolver) => void);
7780declare interface PnpApiImpl {
7781 resolveToUnqualified: (arg0: string, arg1: string, arg2: object) => string;
7782}
7783declare interface PossibleFileSystemError {
7784 code?: string;
7785 errno?: number;
7786 path?: string;
7787 syscall?: string;
7788}
7789declare class PrefetchPlugin {
7790 constructor(context?: any, request?: any);
7791 context: any;
7792 request: any;
7793
7794 /**
7795 * Apply the plugin
7796 */
7797 apply(compiler: Compiler): void;
7798}
7799declare class PrefixSource extends Source {
7800 constructor(prefix: string, source: string | Source);
7801 original(): Source;
7802 getPrefix(): string;
7803}
7804declare interface PreparsedAst {
7805 [index: string]: any;
7806}
7807declare interface PrintedElement {
7808 element: string;
7809 content: string;
7810}
7811declare interface Problem {
7812 type: ProblemType;
7813 path: string;
7814 argument: string;
7815 value?: any;
7816 index?: number;
7817 expected?: string;
7818}
7819type ProblemType =
7820 | "unknown-argument"
7821 | "unexpected-non-array-in-path"
7822 | "unexpected-non-object-in-path"
7823 | "multiple-values-unexpected"
7824 | "invalid-value";
7825declare interface ProcessAssetsAdditionalOptions {
7826 additionalAssets?: true | Function;
7827}
7828declare class Profiler {
7829 constructor(inspector?: any);
7830 session: any;
7831 inspector: any;
7832 hasSession(): boolean;
7833 startProfiling(): Promise<void> | Promise<[any, any, any]>;
7834 sendCommand(method?: any, params?: any): Promise<any>;
7835 destroy(): Promise<void>;
7836 stopProfiling(): Promise<{ profile: any }>;
7837}
7838declare class ProfilingPlugin {
7839 constructor(options?: ProfilingPluginOptions);
7840 outputPath: string;
7841 apply(compiler?: any): void;
7842 static Profiler: typeof Profiler;
7843}
7844declare interface ProfilingPluginOptions {
7845 /**
7846 * Path to the output file e.g. `path.resolve(__dirname, 'profiling/events.json')`. Defaults to `events.json`.
7847 */
7848 outputPath?: string;
7849}
7850declare class ProgressPlugin {
7851 constructor(options?: ProgressPluginArgument);
7852 profile?: null | boolean;
7853 handler?: (percentage: number, msg: string, ...args: string[]) => void;
7854 modulesCount?: number;
7855 dependenciesCount?: number;
7856 showEntries?: boolean;
7857 showModules?: boolean;
7858 showDependencies?: boolean;
7859 showActiveModules?: boolean;
7860 percentBy?: null | "dependencies" | "modules" | "entries";
7861 apply(compiler: Compiler | MultiCompiler): void;
7862 static getReporter(
7863 compiler: Compiler
7864 ): (p: number, ...args: string[]) => void;
7865 static defaultOptions: {
7866 profile: boolean;
7867 modulesCount: number;
7868 dependenciesCount: number;
7869 modules: boolean;
7870 dependencies: boolean;
7871 activeModules: boolean;
7872 entries: boolean;
7873 };
7874}
7875type ProgressPluginArgument =
7876 | ProgressPluginOptions
7877 | ((percentage: number, msg: string, ...args: string[]) => void);
7878
7879/**
7880 * Options object for the ProgressPlugin.
7881 */
7882declare interface ProgressPluginOptions {
7883 /**
7884 * Show active modules count and one active module in progress message.
7885 */
7886 activeModules?: boolean;
7887
7888 /**
7889 * Show dependencies count in progress message.
7890 */
7891 dependencies?: boolean;
7892
7893 /**
7894 * Minimum dependencies count to start with. For better progress calculation. Default: 10000.
7895 */
7896 dependenciesCount?: number;
7897
7898 /**
7899 * Show entries count in progress message.
7900 */
7901 entries?: boolean;
7902
7903 /**
7904 * Function that executes for every progress step.
7905 */
7906 handler?: (percentage: number, msg: string, ...args: string[]) => void;
7907
7908 /**
7909 * Show modules count in progress message.
7910 */
7911 modules?: boolean;
7912
7913 /**
7914 * Minimum modules count to start with. For better progress calculation. Default: 5000.
7915 */
7916 modulesCount?: number;
7917
7918 /**
7919 * Collect percent algorithm. By default it calculates by a median from modules, entries and dependencies percent.
7920 */
7921 percentBy?: null | "dependencies" | "modules" | "entries";
7922
7923 /**
7924 * Collect profile data for progress steps. Default: false.
7925 */
7926 profile?: null | boolean;
7927}
7928declare class ProvidePlugin {
7929 constructor(definitions: Record<string, string | string[]>);
7930 definitions: Record<string, string | string[]>;
7931
7932 /**
7933 * Apply the plugin
7934 */
7935 apply(compiler: Compiler): void;
7936}
7937declare class ProvideSharedPlugin {
7938 constructor(options: ProvideSharedPluginOptions);
7939
7940 /**
7941 * Apply the plugin
7942 */
7943 apply(compiler: Compiler): void;
7944}
7945declare interface ProvideSharedPluginOptions {
7946 /**
7947 * Modules that should be provided as shared modules to the share scope. When provided, property name is used to match modules, otherwise this is automatically inferred from share key.
7948 */
7949 provides: Provides;
7950
7951 /**
7952 * Share scope name used for all provided modules (defaults to 'default').
7953 */
7954 shareScope?: string;
7955}
7956type Provides = (string | ProvidesObject)[] | ProvidesObject;
7957
7958/**
7959 * Advanced configuration for modules that should be provided as shared modules to the share scope.
7960 */
7961declare interface ProvidesConfig {
7962 /**
7963 * Include the provided module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.
7964 */
7965 eager?: boolean;
7966
7967 /**
7968 * Key in the share scope under which the shared modules should be stored.
7969 */
7970 shareKey?: string;
7971
7972 /**
7973 * Share scope name.
7974 */
7975 shareScope?: string;
7976
7977 /**
7978 * Version of the provided module. Will replace lower matching versions, but not higher.
7979 */
7980 version?: string | false;
7981}
7982
7983/**
7984 * Modules that should be provided as shared modules to the share scope. Property names are used as share keys.
7985 */
7986declare interface ProvidesObject {
7987 [index: string]: string | ProvidesConfig;
7988}
7989declare interface RawChunkGroupOptions {
7990 preloadOrder?: number;
7991 prefetchOrder?: number;
7992}
7993declare class RawSource extends Source {
7994 constructor(source: string | Buffer, convertToString?: boolean);
7995 isBuffer(): boolean;
7996}
7997declare class ReadFileCompileWasmPlugin {
7998 constructor(options?: any);
7999 options: any;
8000
8001 /**
8002 * Apply the plugin
8003 */
8004 apply(compiler: Compiler): void;
8005}
8006declare class RealContentHashPlugin {
8007 constructor(__0: { hashFunction: any; hashDigest: any });
8008
8009 /**
8010 * Apply the plugin
8011 */
8012 apply(compiler: Compiler): void;
8013 static getCompilationHooks(
8014 compilation: Compilation
8015 ): CompilationHooksRealContentHashPlugin;
8016}
8017declare interface RealDependencyLocation {
8018 start: SourcePosition;
8019 end?: SourcePosition;
8020 index?: number;
8021}
8022type RecursiveArrayOrRecord<T> =
8023 | { [index: string]: RecursiveArrayOrRecord<T> }
8024 | RecursiveArrayOrRecord<T>[]
8025 | T;
8026declare interface ReferencedExport {
8027 /**
8028 * name of the referenced export
8029 */
8030 name: string[];
8031
8032 /**
8033 * when false, referenced export can not be mangled, defaults to true
8034 */
8035 canMangle?: boolean;
8036}
8037type Remotes = (string | RemotesObject)[] | RemotesObject;
8038
8039/**
8040 * Advanced configuration for container locations from which modules should be resolved and loaded at runtime.
8041 */
8042declare interface RemotesConfig {
8043 /**
8044 * Container locations from which modules should be resolved and loaded at runtime.
8045 */
8046 external: string | string[];
8047
8048 /**
8049 * The name of the share scope shared with this remote.
8050 */
8051 shareScope?: string;
8052}
8053
8054/**
8055 * Container locations from which modules should be resolved and loaded at runtime. Property names are used as request scopes.
8056 */
8057declare interface RemotesObject {
8058 [index: string]: string | RemotesConfig | string[];
8059}
8060declare interface RenderBootstrapContext {
8061 /**
8062 * the chunk
8063 */
8064 chunk: Chunk;
8065
8066 /**
8067 * the runtime template
8068 */
8069 runtimeTemplate: RuntimeTemplate;
8070
8071 /**
8072 * the module graph
8073 */
8074 moduleGraph: ModuleGraph;
8075
8076 /**
8077 * the chunk graph
8078 */
8079 chunkGraph: ChunkGraph;
8080
8081 /**
8082 * hash to be used for render call
8083 */
8084 hash: string;
8085}
8086declare interface RenderContextModuleTemplate {
8087 /**
8088 * the chunk
8089 */
8090 chunk: Chunk;
8091
8092 /**
8093 * the dependency templates
8094 */
8095 dependencyTemplates: DependencyTemplates;
8096
8097 /**
8098 * the runtime template
8099 */
8100 runtimeTemplate: RuntimeTemplate;
8101
8102 /**
8103 * the module graph
8104 */
8105 moduleGraph: ModuleGraph;
8106
8107 /**
8108 * the chunk graph
8109 */
8110 chunkGraph: ChunkGraph;
8111}
8112declare interface RenderContextObject {
8113 /**
8114 * the chunk
8115 */
8116 chunk: Chunk;
8117
8118 /**
8119 * the dependency templates
8120 */
8121 dependencyTemplates: DependencyTemplates;
8122
8123 /**
8124 * the runtime template
8125 */
8126 runtimeTemplate: RuntimeTemplate;
8127
8128 /**
8129 * the module graph
8130 */
8131 moduleGraph: ModuleGraph;
8132
8133 /**
8134 * the chunk graph
8135 */
8136 chunkGraph: ChunkGraph;
8137
8138 /**
8139 * results of code generation
8140 */
8141 codeGenerationResults: CodeGenerationResults;
8142}
8143type RenderManifestEntry =
8144 | RenderManifestEntryTemplated
8145 | RenderManifestEntryStatic;
8146declare interface RenderManifestEntryStatic {
8147 render: () => Source;
8148 filename: string;
8149 info: AssetInfo;
8150 identifier: string;
8151 hash?: string;
8152 auxiliary?: boolean;
8153}
8154declare interface RenderManifestEntryTemplated {
8155 render: () => Source;
8156 filenameTemplate: string | ((arg0: PathData, arg1?: AssetInfo) => string);
8157 pathOptions?: PathData;
8158 info?: AssetInfo;
8159 identifier: string;
8160 hash?: string;
8161 auxiliary?: boolean;
8162}
8163declare interface RenderManifestOptions {
8164 /**
8165 * the chunk used to render
8166 */
8167 chunk: Chunk;
8168 hash: string;
8169 fullHash: string;
8170 outputOptions: Output;
8171 codeGenerationResults: CodeGenerationResults;
8172 moduleTemplates: { javascript: ModuleTemplate };
8173 dependencyTemplates: DependencyTemplates;
8174 runtimeTemplate: RuntimeTemplate;
8175 moduleGraph: ModuleGraph;
8176 chunkGraph: ChunkGraph;
8177}
8178declare class ReplaceSource extends Source {
8179 constructor(source: Source, name?: string);
8180 replace(start: number, end: number, newValue: string, name?: string): void;
8181 insert(pos: number, newValue: string, name?: string): void;
8182 getName(): string;
8183 original(): string;
8184 getReplacements(): {
8185 start: number;
8186 end: number;
8187 content: string;
8188 insertIndex: number;
8189 name: string;
8190 }[];
8191}
8192declare abstract class RequestShortener {
8193 contextify: (arg0: string) => string;
8194 shorten(request?: null | string): undefined | null | string;
8195}
8196declare interface ResolveBuildDependenciesResult {
8197 /**
8198 * list of files
8199 */
8200 files: Set<string>;
8201
8202 /**
8203 * list of directories
8204 */
8205 directories: Set<string>;
8206
8207 /**
8208 * list of missing entries
8209 */
8210 missing: Set<string>;
8211
8212 /**
8213 * stored resolve results
8214 */
8215 resolveResults: Map<string, string>;
8216
8217 /**
8218 * dependencies of the resolving
8219 */
8220 resolveDependencies: {
8221 /**
8222 * list of files
8223 */
8224 files: Set<string>;
8225 /**
8226 * list of directories
8227 */
8228 directories: Set<string>;
8229 /**
8230 * list of missing entries
8231 */
8232 missing: Set<string>;
8233 };
8234}
8235
8236/**
8237 * Resolve context
8238 */
8239declare interface ResolveContext {
8240 contextDependencies?: WriteOnlySet<string>;
8241
8242 /**
8243 * files that was found on file system
8244 */
8245 fileDependencies?: WriteOnlySet<string>;
8246
8247 /**
8248 * dependencies that was not found on file system
8249 */
8250 missingDependencies?: WriteOnlySet<string>;
8251
8252 /**
8253 * set of hooks' calls. For instance, `resolve → parsedResolve → describedResolve`,
8254 */
8255 stack?: Set<string>;
8256
8257 /**
8258 * log function
8259 */
8260 log?: (arg0: string) => void;
8261}
8262declare interface ResolveData {
8263 contextInfo: ModuleFactoryCreateDataContextInfo;
8264 resolveOptions?: ResolveOptionsWebpackOptions;
8265 context: string;
8266 request: string;
8267 dependencies: ModuleDependency[];
8268 createData: Object;
8269 fileDependencies: LazySet<string>;
8270 missingDependencies: LazySet<string>;
8271 contextDependencies: LazySet<string>;
8272
8273 /**
8274 * allow to use the unsafe cache
8275 */
8276 cacheable: boolean;
8277}
8278declare interface ResolveOptionsTypes {
8279 alias: AliasOption[];
8280 fallback: AliasOption[];
8281 aliasFields: Set<string | string[]>;
8282 cachePredicate: (arg0: ResolveRequest) => boolean;
8283 cacheWithContext: boolean;
8284
8285 /**
8286 * A list of exports field condition names.
8287 */
8288 conditionNames: Set<string>;
8289 descriptionFiles: string[];
8290 enforceExtension: boolean;
8291 exportsFields: Set<string | string[]>;
8292 importsFields: Set<string | string[]>;
8293 extensions: Set<string>;
8294 fileSystem: FileSystem;
8295 unsafeCache: false | object;
8296 symlinks: boolean;
8297 resolver?: Resolver;
8298 modules: (string | string[])[];
8299 mainFields: { name: string[]; forceRelative: boolean }[];
8300 mainFiles: Set<string>;
8301 plugins: Plugin[];
8302 pnpApi: null | PnpApiImpl;
8303 roots: Set<string>;
8304 fullySpecified: boolean;
8305 resolveToContext: boolean;
8306 restrictions: Set<string | RegExp>;
8307 preferRelative: boolean;
8308 preferAbsolute: boolean;
8309}
8310
8311/**
8312 * Options object for resolving requests.
8313 */
8314declare interface ResolveOptionsWebpackOptions {
8315 /**
8316 * Redirect module requests.
8317 */
8318 alias?:
8319 | {
8320 /**
8321 * New request.
8322 */
8323 alias: string | false | string[];
8324 /**
8325 * Request to be redirected.
8326 */
8327 name: string;
8328 /**
8329 * Redirect only exact matching request.
8330 */
8331 onlyModule?: boolean;
8332 }[]
8333 | { [index: string]: string | false | string[] };
8334
8335 /**
8336 * Fields in the description file (usually package.json) which are used to redirect requests inside the module.
8337 */
8338 aliasFields?: (string | string[])[];
8339
8340 /**
8341 * Extra resolve options per dependency category. Typical categories are "commonjs", "amd", "esm".
8342 */
8343 byDependency?: { [index: string]: ResolveOptionsWebpackOptions };
8344
8345 /**
8346 * Enable caching of successfully resolved requests (cache entries are revalidated).
8347 */
8348 cache?: boolean;
8349
8350 /**
8351 * Predicate function to decide which requests should be cached.
8352 */
8353 cachePredicate?: (request: ResolveRequest) => boolean;
8354
8355 /**
8356 * Include the context information in the cache identifier when caching.
8357 */
8358 cacheWithContext?: boolean;
8359
8360 /**
8361 * Condition names for exports field entry point.
8362 */
8363 conditionNames?: string[];
8364
8365 /**
8366 * Filenames used to find a description file (like a package.json).
8367 */
8368 descriptionFiles?: string[];
8369
8370 /**
8371 * Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension).
8372 */
8373 enforceExtension?: boolean;
8374
8375 /**
8376 * Field names from the description file (usually package.json) which are used to provide entry points of a package.
8377 */
8378 exportsFields?: string[];
8379
8380 /**
8381 * Extensions added to the request when trying to find the file.
8382 */
8383 extensions?: string[];
8384
8385 /**
8386 * Redirect module requests when normal resolving fails.
8387 */
8388 fallback?:
8389 | {
8390 /**
8391 * New request.
8392 */
8393 alias: string | false | string[];
8394 /**
8395 * Request to be redirected.
8396 */
8397 name: string;
8398 /**
8399 * Redirect only exact matching request.
8400 */
8401 onlyModule?: boolean;
8402 }[]
8403 | { [index: string]: string | false | string[] };
8404
8405 /**
8406 * Filesystem for the resolver.
8407 */
8408 fileSystem?: InputFileSystem;
8409
8410 /**
8411 * Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases).
8412 */
8413 fullySpecified?: boolean;
8414
8415 /**
8416 * Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal).
8417 */
8418 importsFields?: string[];
8419
8420 /**
8421 * Field names from the description file (package.json) which are used to find the default entry point.
8422 */
8423 mainFields?: (string | string[])[];
8424
8425 /**
8426 * Filenames used to find the default entry point if there is no description file or main field.
8427 */
8428 mainFiles?: string[];
8429
8430 /**
8431 * Folder names or directory paths where to find modules.
8432 */
8433 modules?: string[];
8434
8435 /**
8436 * Plugins for the resolver.
8437 */
8438 plugins?: ("..." | ResolvePluginInstance)[];
8439
8440 /**
8441 * Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.
8442 */
8443 preferAbsolute?: boolean;
8444
8445 /**
8446 * Prefer to resolve module requests as relative request and fallback to resolving as module.
8447 */
8448 preferRelative?: boolean;
8449
8450 /**
8451 * Custom resolver.
8452 */
8453 resolver?: Resolver;
8454
8455 /**
8456 * A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met.
8457 */
8458 restrictions?: (string | RegExp)[];
8459
8460 /**
8461 * A list of directories in which requests that are server-relative URLs (starting with '/') are resolved.
8462 */
8463 roots?: string[];
8464
8465 /**
8466 * Enable resolving symlinks to the original location.
8467 */
8468 symlinks?: boolean;
8469
8470 /**
8471 * Enable caching of successfully resolved requests (cache entries are not revalidated).
8472 */
8473 unsafeCache?: boolean | { [index: string]: any };
8474
8475 /**
8476 * Use synchronous filesystem calls for the resolver.
8477 */
8478 useSyncFileSystemCalls?: boolean;
8479}
8480type ResolveOptionsWithDependencyType = ResolveOptionsWebpackOptions & {
8481 dependencyType?: string;
8482 resolveToContext?: boolean;
8483};
8484
8485/**
8486 * Plugin instance.
8487 */
8488declare interface ResolvePluginInstance {
8489 [index: string]: any;
8490
8491 /**
8492 * The run point of the plugin, required method.
8493 */
8494 apply: (resolver: Resolver) => void;
8495}
8496type ResolveRequest = BaseResolveRequest & Partial<ParsedIdentifier>;
8497declare abstract class Resolver {
8498 fileSystem: FileSystem;
8499 options: ResolveOptionsTypes;
8500 hooks: {
8501 resolveStep: SyncHook<
8502 [
8503 AsyncSeriesBailHook<
8504 [ResolveRequest, ResolveContext],
8505 null | ResolveRequest
8506 >,
8507 ResolveRequest
8508 ]
8509 >;
8510 noResolve: SyncHook<[ResolveRequest, Error]>;
8511 resolve: AsyncSeriesBailHook<
8512 [ResolveRequest, ResolveContext],
8513 null | ResolveRequest
8514 >;
8515 result: AsyncSeriesHook<[ResolveRequest, ResolveContext]>;
8516 };
8517 ensureHook(
8518 name:
8519 | string
8520 | AsyncSeriesBailHook<
8521 [ResolveRequest, ResolveContext],
8522 null | ResolveRequest
8523 >
8524 ): AsyncSeriesBailHook<
8525 [ResolveRequest, ResolveContext],
8526 null | ResolveRequest
8527 >;
8528 getHook(
8529 name:
8530 | string
8531 | AsyncSeriesBailHook<
8532 [ResolveRequest, ResolveContext],
8533 null | ResolveRequest
8534 >
8535 ): AsyncSeriesBailHook<
8536 [ResolveRequest, ResolveContext],
8537 null | ResolveRequest
8538 >;
8539 resolveSync(context: object, path: string, request: string): string | false;
8540 resolve(
8541 context: object,
8542 path: string,
8543 request: string,
8544 resolveContext: ResolveContext,
8545 callback: (
8546 arg0: null | Error,
8547 arg1?: string | false,
8548 arg2?: ResolveRequest
8549 ) => void
8550 ): void;
8551 doResolve(
8552 hook?: any,
8553 request?: any,
8554 message?: any,
8555 resolveContext?: any,
8556 callback?: any
8557 ): any;
8558 parse(identifier: string): ParsedIdentifier;
8559 isModule(path?: any): boolean;
8560 isPrivate(path?: any): boolean;
8561 isDirectory(path: string): boolean;
8562 join(path?: any, request?: any): string;
8563 normalize(path?: any): string;
8564}
8565declare interface ResolverCache {
8566 direct: WeakMap<Object, ResolverWithOptions>;
8567 stringified: Map<string, ResolverWithOptions>;
8568}
8569declare abstract class ResolverFactory {
8570 hooks: Readonly<{
8571 resolveOptions: HookMap<
8572 SyncWaterfallHook<[ResolveOptionsWithDependencyType]>
8573 >;
8574 resolver: HookMap<
8575 SyncHook<[Resolver, UserResolveOptions, ResolveOptionsWithDependencyType]>
8576 >;
8577 }>;
8578 cache: Map<string, ResolverCache>;
8579 get(
8580 type: string,
8581 resolveOptions?: ResolveOptionsWithDependencyType
8582 ): ResolverWithOptions;
8583}
8584type ResolverWithOptions = Resolver & WithOptions;
8585
8586declare interface ResourceDataWithData {
8587 resource: string;
8588 path: string;
8589 query: string;
8590 fragment: string;
8591 data: Record<string, any>;
8592}
8593type Rule = string | RegExp;
8594declare interface RuleSet {
8595 /**
8596 * map of references in the rule set (may grow over time)
8597 */
8598 references: Map<string, any>;
8599
8600 /**
8601 * execute the rule set
8602 */
8603 exec: (arg0: object) => Effect[];
8604}
8605type RuleSetCondition =
8606 | string
8607 | RegExp
8608 | {
8609 /**
8610 * Logical AND.
8611 */
8612 and?: RuleSetCondition[];
8613 /**
8614 * Logical NOT.
8615 */
8616 not?: RuleSetCondition[];
8617 /**
8618 * Logical OR.
8619 */
8620 or?: RuleSetCondition[];
8621 }
8622 | ((value: string) => boolean)
8623 | RuleSetCondition[];
8624type RuleSetConditionAbsolute =
8625 | string
8626 | RegExp
8627 | {
8628 /**
8629 * Logical AND.
8630 */
8631 and?: RuleSetConditionAbsolute[];
8632 /**
8633 * Logical NOT.
8634 */
8635 not?: RuleSetConditionAbsolute[];
8636 /**
8637 * Logical OR.
8638 */
8639 or?: RuleSetConditionAbsolute[];
8640 }
8641 | ((value: string) => boolean)
8642 | RuleSetConditionAbsolute[];
8643type RuleSetConditionOrConditions =
8644 | string
8645 | RegExp
8646 | {
8647 /**
8648 * Logical AND.
8649 */
8650 and?: RuleSetCondition[];
8651 /**
8652 * Logical NOT.
8653 */
8654 not?: RuleSetCondition[];
8655 /**
8656 * Logical OR.
8657 */
8658 or?: RuleSetCondition[];
8659 }
8660 | ((value: string) => boolean)
8661 | RuleSetCondition[];
8662
8663/**
8664 * A rule description with conditions and effects for modules.
8665 */
8666declare interface RuleSetRule {
8667 /**
8668 * Match the child compiler name.
8669 */
8670 compiler?:
8671 | string
8672 | RegExp
8673 | {
8674 /**
8675 * Logical AND.
8676 */
8677 and?: RuleSetCondition[];
8678 /**
8679 * Logical NOT.
8680 */
8681 not?: RuleSetCondition[];
8682 /**
8683 * Logical OR.
8684 */
8685 or?: RuleSetCondition[];
8686 }
8687 | ((value: string) => boolean)
8688 | RuleSetCondition[];
8689
8690 /**
8691 * Match dependency type.
8692 */
8693 dependency?:
8694 | string
8695 | RegExp
8696 | {
8697 /**
8698 * Logical AND.
8699 */
8700 and?: RuleSetCondition[];
8701 /**
8702 * Logical NOT.
8703 */
8704 not?: RuleSetCondition[];
8705 /**
8706 * Logical OR.
8707 */
8708 or?: RuleSetCondition[];
8709 }
8710 | ((value: string) => boolean)
8711 | RuleSetCondition[];
8712
8713 /**
8714 * Match values of properties in the description file (usually package.json).
8715 */
8716 descriptionData?: { [index: string]: RuleSetConditionOrConditions };
8717
8718 /**
8719 * Enforce this rule as pre or post step.
8720 */
8721 enforce?: "pre" | "post";
8722
8723 /**
8724 * Shortcut for resource.exclude.
8725 */
8726 exclude?:
8727 | string
8728 | RegExp
8729 | {
8730 /**
8731 * Logical AND.
8732 */
8733 and?: RuleSetConditionAbsolute[];
8734 /**
8735 * Logical NOT.
8736 */
8737 not?: RuleSetConditionAbsolute[];
8738 /**
8739 * Logical OR.
8740 */
8741 or?: RuleSetConditionAbsolute[];
8742 }
8743 | ((value: string) => boolean)
8744 | RuleSetConditionAbsolute[];
8745
8746 /**
8747 * The options for the module generator.
8748 */
8749 generator?: { [index: string]: any };
8750
8751 /**
8752 * Shortcut for resource.include.
8753 */
8754 include?:
8755 | string
8756 | RegExp
8757 | {
8758 /**
8759 * Logical AND.
8760 */
8761 and?: RuleSetConditionAbsolute[];
8762 /**
8763 * Logical NOT.
8764 */
8765 not?: RuleSetConditionAbsolute[];
8766 /**
8767 * Logical OR.
8768 */
8769 or?: RuleSetConditionAbsolute[];
8770 }
8771 | ((value: string) => boolean)
8772 | RuleSetConditionAbsolute[];
8773
8774 /**
8775 * Match the issuer of the module (The module pointing to this module).
8776 */
8777 issuer?:
8778 | string
8779 | RegExp
8780 | {
8781 /**
8782 * Logical AND.
8783 */
8784 and?: RuleSetConditionAbsolute[];
8785 /**
8786 * Logical NOT.
8787 */
8788 not?: RuleSetConditionAbsolute[];
8789 /**
8790 * Logical OR.
8791 */
8792 or?: RuleSetConditionAbsolute[];
8793 }
8794 | ((value: string) => boolean)
8795 | RuleSetConditionAbsolute[];
8796
8797 /**
8798 * Match layer of the issuer of this module (The module pointing to this module).
8799 */
8800 issuerLayer?:
8801 | string
8802 | RegExp
8803 | {
8804 /**
8805 * Logical AND.
8806 */
8807 and?: RuleSetCondition[];
8808 /**
8809 * Logical NOT.
8810 */
8811 not?: RuleSetCondition[];
8812 /**
8813 * Logical OR.
8814 */
8815 or?: RuleSetCondition[];
8816 }
8817 | ((value: string) => boolean)
8818 | RuleSetCondition[];
8819
8820 /**
8821 * Specifies the layer in which the module should be placed in.
8822 */
8823 layer?: string;
8824
8825 /**
8826 * Shortcut for use.loader.
8827 */
8828 loader?: string;
8829
8830 /**
8831 * Match module mimetype when load from Data URI.
8832 */
8833 mimetype?:
8834 | string
8835 | RegExp
8836 | {
8837 /**
8838 * Logical AND.
8839 */
8840 and?: RuleSetCondition[];
8841 /**
8842 * Logical NOT.
8843 */
8844 not?: RuleSetCondition[];
8845 /**
8846 * Logical OR.
8847 */
8848 or?: RuleSetCondition[];
8849 }
8850 | ((value: string) => boolean)
8851 | RuleSetCondition[];
8852
8853 /**
8854 * Only execute the first matching rule in this array.
8855 */
8856 oneOf?: RuleSetRule[];
8857
8858 /**
8859 * Shortcut for use.options.
8860 */
8861 options?: string | { [index: string]: any };
8862
8863 /**
8864 * Options for parsing.
8865 */
8866 parser?: { [index: string]: any };
8867
8868 /**
8869 * Match the real resource path of the module.
8870 */
8871 realResource?:
8872 | string
8873 | RegExp
8874 | {
8875 /**
8876 * Logical AND.
8877 */
8878 and?: RuleSetConditionAbsolute[];
8879 /**
8880 * Logical NOT.
8881 */
8882 not?: RuleSetConditionAbsolute[];
8883 /**
8884 * Logical OR.
8885 */
8886 or?: RuleSetConditionAbsolute[];
8887 }
8888 | ((value: string) => boolean)
8889 | RuleSetConditionAbsolute[];
8890
8891 /**
8892 * Options for the resolver.
8893 */
8894 resolve?: ResolveOptionsWebpackOptions;
8895
8896 /**
8897 * Match the resource path of the module.
8898 */
8899 resource?:
8900 | string
8901 | RegExp
8902 | {
8903 /**
8904 * Logical AND.
8905 */
8906 and?: RuleSetConditionAbsolute[];
8907 /**
8908 * Logical NOT.
8909 */
8910 not?: RuleSetConditionAbsolute[];
8911 /**
8912 * Logical OR.
8913 */
8914 or?: RuleSetConditionAbsolute[];
8915 }
8916 | ((value: string) => boolean)
8917 | RuleSetConditionAbsolute[];
8918
8919 /**
8920 * Match the resource fragment of the module.
8921 */
8922 resourceFragment?:
8923 | string
8924 | RegExp
8925 | {
8926 /**
8927 * Logical AND.
8928 */
8929 and?: RuleSetCondition[];
8930 /**
8931 * Logical NOT.
8932 */
8933 not?: RuleSetCondition[];
8934 /**
8935 * Logical OR.
8936 */
8937 or?: RuleSetCondition[];
8938 }
8939 | ((value: string) => boolean)
8940 | RuleSetCondition[];
8941
8942 /**
8943 * Match the resource query of the module.
8944 */
8945 resourceQuery?:
8946 | string
8947 | RegExp
8948 | {
8949 /**
8950 * Logical AND.
8951 */
8952 and?: RuleSetCondition[];
8953 /**
8954 * Logical NOT.
8955 */
8956 not?: RuleSetCondition[];
8957 /**
8958 * Logical OR.
8959 */
8960 or?: RuleSetCondition[];
8961 }
8962 | ((value: string) => boolean)
8963 | RuleSetCondition[];
8964
8965 /**
8966 * Match and execute these rules when this rule is matched.
8967 */
8968 rules?: RuleSetRule[];
8969
8970 /**
8971 * Flags a module as with or without side effects.
8972 */
8973 sideEffects?: boolean;
8974
8975 /**
8976 * Shortcut for resource.test.
8977 */
8978 test?:
8979 | string
8980 | RegExp
8981 | {
8982 /**
8983 * Logical AND.
8984 */
8985 and?: RuleSetConditionAbsolute[];
8986 /**
8987 * Logical NOT.
8988 */
8989 not?: RuleSetConditionAbsolute[];
8990 /**
8991 * Logical OR.
8992 */
8993 or?: RuleSetConditionAbsolute[];
8994 }
8995 | ((value: string) => boolean)
8996 | RuleSetConditionAbsolute[];
8997
8998 /**
8999 * Module type to use for the module.
9000 */
9001 type?: string;
9002
9003 /**
9004 * Modifiers applied to the module when rule is matched.
9005 */
9006 use?:
9007 | string
9008 | RuleSetUseItem[]
9009 | ((data: {
9010 resource: string;
9011 realResource: string;
9012 resourceQuery: string;
9013 issuer: string;
9014 compiler: string;
9015 }) => RuleSetUseItem[])
9016 | {
9017 /**
9018 * Unique loader options identifier.
9019 */
9020 ident?: string;
9021 /**
9022 * Loader name.
9023 */
9024 loader?: string;
9025 /**
9026 * Loader options.
9027 */
9028 options?: string | { [index: string]: any };
9029 }
9030 | ((
9031 data: object
9032 ) =>
9033 | string
9034 | {
9035 /**
9036 * Unique loader options identifier.
9037 */
9038 ident?: string;
9039 /**
9040 * Loader name.
9041 */
9042 loader?: string;
9043 /**
9044 * Loader options.
9045 */
9046 options?: string | { [index: string]: any };
9047 }
9048 | __TypeWebpackOptions
9049 | RuleSetUseItem[]);
9050}
9051type RuleSetUse =
9052 | string
9053 | RuleSetUseItem[]
9054 | ((data: {
9055 resource: string;
9056 realResource: string;
9057 resourceQuery: string;
9058 issuer: string;
9059 compiler: string;
9060 }) => RuleSetUseItem[])
9061 | {
9062 /**
9063 * Unique loader options identifier.
9064 */
9065 ident?: string;
9066 /**
9067 * Loader name.
9068 */
9069 loader?: string;
9070 /**
9071 * Loader options.
9072 */
9073 options?: string | { [index: string]: any };
9074 }
9075 | __TypeWebpackOptions;
9076type RuleSetUseItem =
9077 | string
9078 | {
9079 /**
9080 * Unique loader options identifier.
9081 */
9082 ident?: string;
9083 /**
9084 * Loader name.
9085 */
9086 loader?: string;
9087 /**
9088 * Loader options.
9089 */
9090 options?: string | { [index: string]: any };
9091 }
9092 | __TypeWebpackOptions;
9093declare class RuntimeChunkPlugin {
9094 constructor(options?: any);
9095 options: any;
9096
9097 /**
9098 * Apply the plugin
9099 */
9100 apply(compiler: Compiler): void;
9101}
9102declare class RuntimeModule extends Module {
9103 constructor(name: string, stage?: number);
9104 name: string;
9105 stage: number;
9106 compilation: Compilation;
9107 chunk: Chunk;
9108 fullHash: boolean;
9109 attach(compilation: Compilation, chunk: Chunk): void;
9110 generate(): string;
9111 getGeneratedCode(): string;
9112 shouldIsolate(): boolean;
9113
9114 /**
9115 * Runtime modules without any dependencies to other runtime modules
9116 */
9117 static STAGE_NORMAL: number;
9118
9119 /**
9120 * Runtime modules with simple dependencies on other runtime modules
9121 */
9122 static STAGE_BASIC: number;
9123
9124 /**
9125 * Runtime modules which attach to handlers of other runtime modules
9126 */
9127 static STAGE_ATTACH: number;
9128
9129 /**
9130 * Runtime modules which trigger actions on bootstrap
9131 */
9132 static STAGE_TRIGGER: number;
9133}
9134type RuntimeSpec = undefined | string | SortableSet<string>;
9135declare abstract class RuntimeSpecMap<T> {
9136 get(runtime: RuntimeSpec): T;
9137 has(runtime: RuntimeSpec): boolean;
9138 set(runtime?: any, value?: any): void;
9139 provide(runtime?: any, computer?: any): any;
9140 delete(runtime?: any): void;
9141 update(runtime?: any, fn?: any): void;
9142 keys(): RuntimeSpec[];
9143 values(): IterableIterator<T>;
9144 readonly size?: number;
9145}
9146declare abstract class RuntimeSpecSet {
9147 add(runtime?: any): void;
9148 has(runtime?: any): boolean;
9149 [Symbol.iterator](): IterableIterator<RuntimeSpec>;
9150 readonly size: number;
9151}
9152declare abstract class RuntimeTemplate {
9153 compilation: Compilation;
9154 outputOptions: OutputNormalized;
9155 requestShortener: RequestShortener;
9156 isIIFE(): undefined | boolean;
9157 isModule(): undefined | boolean;
9158 supportsConst(): undefined | boolean;
9159 supportsArrowFunction(): undefined | boolean;
9160 supportsForOf(): undefined | boolean;
9161 supportsDestructuring(): undefined | boolean;
9162 supportsBigIntLiteral(): undefined | boolean;
9163 supportsDynamicImport(): undefined | boolean;
9164 supportsEcmaScriptModuleSyntax(): undefined | boolean;
9165 supportTemplateLiteral(): boolean;
9166 returningFunction(returnValue?: any, args?: string): string;
9167 basicFunction(args?: any, body?: any): string;
9168 emptyFunction(): "x => {}" | "function() {}";
9169 destructureArray(items?: any, value?: any): string;
9170 iife(args?: any, body?: any): string;
9171 forEach(variable?: any, array?: any, body?: any): string;
9172
9173 /**
9174 * Add a comment
9175 */
9176 comment(__0: {
9177 /**
9178 * request string used originally
9179 */
9180 request?: string;
9181 /**
9182 * name of the chunk referenced
9183 */
9184 chunkName?: string;
9185 /**
9186 * reason information of the chunk
9187 */
9188 chunkReason?: string;
9189 /**
9190 * additional message
9191 */
9192 message?: string;
9193 /**
9194 * name of the export
9195 */
9196 exportName?: string;
9197 }): string;
9198 throwMissingModuleErrorBlock(__0: {
9199 /**
9200 * request string used originally
9201 */
9202 request?: string;
9203 }): string;
9204 throwMissingModuleErrorFunction(__0: {
9205 /**
9206 * request string used originally
9207 */
9208 request?: string;
9209 }): string;
9210 missingModule(__0: {
9211 /**
9212 * request string used originally
9213 */
9214 request?: string;
9215 }): string;
9216 missingModuleStatement(__0: {
9217 /**
9218 * request string used originally
9219 */
9220 request?: string;
9221 }): string;
9222 missingModulePromise(__0: {
9223 /**
9224 * request string used originally
9225 */
9226 request?: string;
9227 }): string;
9228 weakError(__0: {
9229 /**
9230 * the chunk graph
9231 */
9232 chunkGraph: ChunkGraph;
9233 /**
9234 * the module
9235 */
9236 module: Module;
9237 /**
9238 * the request that should be printed as comment
9239 */
9240 request: string;
9241 /**
9242 * expression to use as id expression
9243 */
9244 idExpr?: string;
9245 /**
9246 * which kind of code should be returned
9247 */
9248 type: "promise" | "expression" | "statements";
9249 }): string;
9250 moduleId(__0: {
9251 /**
9252 * the module
9253 */
9254 module: Module;
9255 /**
9256 * the chunk graph
9257 */
9258 chunkGraph: ChunkGraph;
9259 /**
9260 * the request that should be printed as comment
9261 */
9262 request: string;
9263 /**
9264 * if the dependency is weak (will create a nice error message)
9265 */
9266 weak?: boolean;
9267 }): string;
9268 moduleRaw(__0: {
9269 /**
9270 * the module
9271 */
9272 module: Module;
9273 /**
9274 * the chunk graph
9275 */
9276 chunkGraph: ChunkGraph;
9277 /**
9278 * the request that should be printed as comment
9279 */
9280 request: string;
9281 /**
9282 * if the dependency is weak (will create a nice error message)
9283 */
9284 weak?: boolean;
9285 /**
9286 * if set, will be filled with runtime requirements
9287 */
9288 runtimeRequirements: Set<string>;
9289 }): string;
9290 moduleExports(__0: {
9291 /**
9292 * the module
9293 */
9294 module: Module;
9295 /**
9296 * the chunk graph
9297 */
9298 chunkGraph: ChunkGraph;
9299 /**
9300 * the request that should be printed as comment
9301 */
9302 request: string;
9303 /**
9304 * if the dependency is weak (will create a nice error message)
9305 */
9306 weak?: boolean;
9307 /**
9308 * if set, will be filled with runtime requirements
9309 */
9310 runtimeRequirements: Set<string>;
9311 }): string;
9312 moduleNamespace(__0: {
9313 /**
9314 * the module
9315 */
9316 module: Module;
9317 /**
9318 * the chunk graph
9319 */
9320 chunkGraph: ChunkGraph;
9321 /**
9322 * the request that should be printed as comment
9323 */
9324 request: string;
9325 /**
9326 * if the current module is in strict esm mode
9327 */
9328 strict?: boolean;
9329 /**
9330 * if the dependency is weak (will create a nice error message)
9331 */
9332 weak?: boolean;
9333 /**
9334 * if set, will be filled with runtime requirements
9335 */
9336 runtimeRequirements: Set<string>;
9337 }): string;
9338 moduleNamespacePromise(__0: {
9339 /**
9340 * the chunk graph
9341 */
9342 chunkGraph: ChunkGraph;
9343 /**
9344 * the current dependencies block
9345 */
9346 block?: AsyncDependenciesBlock;
9347 /**
9348 * the module
9349 */
9350 module: Module;
9351 /**
9352 * the request that should be printed as comment
9353 */
9354 request: string;
9355 /**
9356 * a message for the comment
9357 */
9358 message: string;
9359 /**
9360 * if the current module is in strict esm mode
9361 */
9362 strict?: boolean;
9363 /**
9364 * if the dependency is weak (will create a nice error message)
9365 */
9366 weak?: boolean;
9367 /**
9368 * if set, will be filled with runtime requirements
9369 */
9370 runtimeRequirements: Set<string>;
9371 }): string;
9372 runtimeConditionExpression(__0: {
9373 /**
9374 * the chunk graph
9375 */
9376 chunkGraph: ChunkGraph;
9377 /**
9378 * runtime for which this code will be generated
9379 */
9380 runtime?: RuntimeSpec;
9381 /**
9382 * only execute the statement in some runtimes
9383 */
9384 runtimeCondition?: string | boolean | SortableSet<string>;
9385 /**
9386 * if set, will be filled with runtime requirements
9387 */
9388 runtimeRequirements: Set<string>;
9389 }): string;
9390 importStatement(__0: {
9391 /**
9392 * whether a new variable should be created or the existing one updated
9393 */
9394 update?: boolean;
9395 /**
9396 * the module
9397 */
9398 module: Module;
9399 /**
9400 * the chunk graph
9401 */
9402 chunkGraph: ChunkGraph;
9403 /**
9404 * the request that should be printed as comment
9405 */
9406 request: string;
9407 /**
9408 * name of the import variable
9409 */
9410 importVar: string;
9411 /**
9412 * module in which the statement is emitted
9413 */
9414 originModule: Module;
9415 /**
9416 * true, if this is a weak dependency
9417 */
9418 weak?: boolean;
9419 /**
9420 * if set, will be filled with runtime requirements
9421 */
9422 runtimeRequirements: Set<string>;
9423 }): [string, string];
9424 exportFromImport(__0: {
9425 /**
9426 * the module graph
9427 */
9428 moduleGraph: ModuleGraph;
9429 /**
9430 * the module
9431 */
9432 module: Module;
9433 /**
9434 * the request
9435 */
9436 request: string;
9437 /**
9438 * the export name
9439 */
9440 exportName: string | string[];
9441 /**
9442 * the origin module
9443 */
9444 originModule: Module;
9445 /**
9446 * true, if location is safe for ASI, a bracket can be emitted
9447 */
9448 asiSafe?: boolean;
9449 /**
9450 * true, if expression will be called
9451 */
9452 isCall: boolean;
9453 /**
9454 * when false, call context will not be preserved
9455 */
9456 callContext: boolean;
9457 /**
9458 * when true and accessing the default exports, interop code will be generated
9459 */
9460 defaultInterop: boolean;
9461 /**
9462 * the identifier name of the import variable
9463 */
9464 importVar: string;
9465 /**
9466 * init fragments will be added here
9467 */
9468 initFragments: InitFragment[];
9469 /**
9470 * runtime for which this code will be generated
9471 */
9472 runtime: RuntimeSpec;
9473 /**
9474 * if set, will be filled with runtime requirements
9475 */
9476 runtimeRequirements: Set<string>;
9477 }): string;
9478 blockPromise(__0: {
9479 /**
9480 * the async block
9481 */
9482 block: AsyncDependenciesBlock;
9483 /**
9484 * the message
9485 */
9486 message: string;
9487 /**
9488 * the chunk graph
9489 */
9490 chunkGraph: ChunkGraph;
9491 /**
9492 * if set, will be filled with runtime requirements
9493 */
9494 runtimeRequirements: Set<string>;
9495 }): string;
9496 asyncModuleFactory(__0: {
9497 /**
9498 * the async block
9499 */
9500 block: AsyncDependenciesBlock;
9501 /**
9502 * the chunk graph
9503 */
9504 chunkGraph: ChunkGraph;
9505 /**
9506 * if set, will be filled with runtime requirements
9507 */
9508 runtimeRequirements: Set<string>;
9509 /**
9510 * request string used originally
9511 */
9512 request?: string;
9513 }): string;
9514 syncModuleFactory(__0: {
9515 /**
9516 * the dependency
9517 */
9518 dependency: Dependency;
9519 /**
9520 * the chunk graph
9521 */
9522 chunkGraph: ChunkGraph;
9523 /**
9524 * if set, will be filled with runtime requirements
9525 */
9526 runtimeRequirements: Set<string>;
9527 /**
9528 * request string used originally
9529 */
9530 request?: string;
9531 }): string;
9532 defineEsModuleFlagStatement(__0: {
9533 /**
9534 * the name of the exports object
9535 */
9536 exportsArgument: string;
9537 /**
9538 * if set, will be filled with runtime requirements
9539 */
9540 runtimeRequirements: Set<string>;
9541 }): string;
9542}
9543declare abstract class RuntimeValue {
9544 fn: any;
9545 fileDependencies: any;
9546 exec(parser?: any): any;
9547}
9548type Schema =
9549 | (JSONSchema4 & Extend)
9550 | (JSONSchema6 & Extend)
9551 | (JSONSchema7 & Extend);
9552declare interface ScopeInfo {
9553 definitions: StackedMap<string, ScopeInfo | VariableInfo>;
9554 topLevelScope: boolean | "arrow";
9555 inShorthand: boolean;
9556 isStrict: boolean;
9557 isAsmJs: boolean;
9558 inTry: boolean;
9559}
9560declare interface Selector<A, B> {
9561 (input: A): B;
9562}
9563declare abstract class Serializer {
9564 serializeMiddlewares: any;
9565 deserializeMiddlewares: any;
9566 context: any;
9567 serialize(obj?: any, context?: any): any;
9568 deserialize(value?: any, context?: any): any;
9569}
9570declare class SharePlugin {
9571 constructor(options: SharePluginOptions);
9572
9573 /**
9574 * Apply the plugin
9575 */
9576 apply(compiler: Compiler): void;
9577}
9578
9579/**
9580 * Options for shared modules.
9581 */
9582declare interface SharePluginOptions {
9583 /**
9584 * Share scope name used for all shared modules (defaults to 'default').
9585 */
9586 shareScope?: string;
9587
9588 /**
9589 * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.
9590 */
9591 shared: Shared;
9592}
9593type Shared = (string | SharedObject)[] | SharedObject;
9594
9595/**
9596 * Advanced configuration for modules that should be shared in the share scope.
9597 */
9598declare interface SharedConfig {
9599 /**
9600 * Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.
9601 */
9602 eager?: boolean;
9603
9604 /**
9605 * Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn't valid. Defaults to the property name.
9606 */
9607 import?: string | false;
9608
9609 /**
9610 * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.
9611 */
9612 packageName?: string;
9613
9614 /**
9615 * Version requirement from module in share scope.
9616 */
9617 requiredVersion?: string | false;
9618
9619 /**
9620 * Module is looked up under this key from the share scope.
9621 */
9622 shareKey?: string;
9623
9624 /**
9625 * Share scope name.
9626 */
9627 shareScope?: string;
9628
9629 /**
9630 * Allow only a single version of the shared module in share scope (disabled by default).
9631 */
9632 singleton?: boolean;
9633
9634 /**
9635 * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
9636 */
9637 strictVersion?: boolean;
9638
9639 /**
9640 * Version of the provided module. Will replace lower matching versions, but not higher.
9641 */
9642 version?: string | false;
9643}
9644
9645/**
9646 * Modules that should be shared in the share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.
9647 */
9648declare interface SharedObject {
9649 [index: string]: string | SharedConfig;
9650}
9651declare class SideEffectsFlagPlugin {
9652 constructor(analyseSource?: boolean);
9653
9654 /**
9655 * Apply the plugin
9656 */
9657 apply(compiler: Compiler): void;
9658 static moduleHasSideEffects(
9659 moduleName?: any,
9660 flagValue?: any,
9661 cache?: any
9662 ): any;
9663}
9664declare class SizeOnlySource extends Source {
9665 constructor(size: number);
9666}
9667declare abstract class Snapshot {
9668 startTime?: number;
9669 fileTimestamps?: Map<string, FileSystemInfoEntry>;
9670 fileHashes?: Map<string, string>;
9671 fileTshs?: Map<string, string | TimestampAndHash>;
9672 contextTimestamps?: Map<string, FileSystemInfoEntry>;
9673 contextHashes?: Map<string, string>;
9674 contextTshs?: Map<string, string | TimestampAndHash>;
9675 missingExistence?: Map<string, boolean>;
9676 managedItemInfo?: Map<string, string>;
9677 managedFiles?: Set<string>;
9678 managedContexts?: Set<string>;
9679 managedMissing?: Set<string>;
9680 children?: Set<Snapshot>;
9681 hasStartTime(): boolean;
9682 setStartTime(value?: any): void;
9683 setMergedStartTime(value?: any, snapshot?: any): void;
9684 hasFileTimestamps(): boolean;
9685 setFileTimestamps(value?: any): void;
9686 hasFileHashes(): boolean;
9687 setFileHashes(value?: any): void;
9688 hasFileTshs(): boolean;
9689 setFileTshs(value?: any): void;
9690 hasContextTimestamps(): boolean;
9691 setContextTimestamps(value?: any): void;
9692 hasContextHashes(): boolean;
9693 setContextHashes(value?: any): void;
9694 hasContextTshs(): boolean;
9695 setContextTshs(value?: any): void;
9696 hasMissingExistence(): boolean;
9697 setMissingExistence(value?: any): void;
9698 hasManagedItemInfo(): boolean;
9699 setManagedItemInfo(value?: any): void;
9700 hasManagedFiles(): boolean;
9701 setManagedFiles(value?: any): void;
9702 hasManagedContexts(): boolean;
9703 setManagedContexts(value?: any): void;
9704 hasManagedMissing(): boolean;
9705 setManagedMissing(value?: any): void;
9706 hasChildren(): boolean;
9707 setChildren(value?: any): void;
9708 addChild(child?: any): void;
9709 serialize(__0: { write: any }): void;
9710 deserialize(__0: { read: any }): void;
9711 getFileIterable(): Iterable<string>;
9712 getContextIterable(): Iterable<string>;
9713 getMissingIterable(): Iterable<string>;
9714}
9715
9716/**
9717 * Options affecting how file system snapshots are created and validated.
9718 */
9719declare interface SnapshotOptions {
9720 /**
9721 * Options for snapshotting build dependencies to determine if the whole cache need to be invalidated.
9722 */
9723 buildDependencies?: {
9724 /**
9725 * Use hashes of the content of the files/directories to determine invalidation.
9726 */
9727 hash?: boolean;
9728 /**
9729 * Use timestamps of the files/directories to determine invalidation.
9730 */
9731 timestamp?: boolean;
9732 };
9733
9734 /**
9735 * List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.
9736 */
9737 immutablePaths?: string[];
9738
9739 /**
9740 * List of paths that are managed by a package manager and can be trusted to not be modified otherwise.
9741 */
9742 managedPaths?: string[];
9743
9744 /**
9745 * Options for snapshotting dependencies of modules to determine if they need to be built again.
9746 */
9747 module?: {
9748 /**
9749 * Use hashes of the content of the files/directories to determine invalidation.
9750 */
9751 hash?: boolean;
9752 /**
9753 * Use timestamps of the files/directories to determine invalidation.
9754 */
9755 timestamp?: boolean;
9756 };
9757
9758 /**
9759 * Options for snapshotting dependencies of request resolving to determine if requests need to be re-resolved.
9760 */
9761 resolve?: {
9762 /**
9763 * Use hashes of the content of the files/directories to determine invalidation.
9764 */
9765 hash?: boolean;
9766 /**
9767 * Use timestamps of the files/directories to determine invalidation.
9768 */
9769 timestamp?: boolean;
9770 };
9771
9772 /**
9773 * Options for snapshotting the resolving of build dependencies to determine if the build dependencies need to be re-resolved.
9774 */
9775 resolveBuildDependencies?: {
9776 /**
9777 * Use hashes of the content of the files/directories to determine invalidation.
9778 */
9779 hash?: boolean;
9780 /**
9781 * Use timestamps of the files/directories to determine invalidation.
9782 */
9783 timestamp?: boolean;
9784 };
9785}
9786declare abstract class SortableSet<T> extends Set<T> {
9787 /**
9788 * Sort with a comparer function
9789 */
9790 sortWith(sortFn: (arg0: T, arg1: T) => number): void;
9791 sort(): SortableSet<T>;
9792
9793 /**
9794 * Get data from cache
9795 */
9796 getFromCache<R>(fn: (arg0: SortableSet<T>) => R): R;
9797
9798 /**
9799 * Get data from cache (ignoring sorting)
9800 */
9801 getFromUnorderedCache<R>(fn: (arg0: SortableSet<T>) => R): R;
9802 toJSON(): T[];
9803
9804 /**
9805 * Iterates over values in the set.
9806 */
9807 [Symbol.iterator](): IterableIterator<T>;
9808 readonly [Symbol.toStringTag]: string;
9809}
9810declare class Source {
9811 constructor();
9812 size(): number;
9813 map(options?: MapOptions): Object;
9814 sourceAndMap(options?: MapOptions): { source: string | Buffer; map: Object };
9815 updateHash(hash: Hash): void;
9816 source(): string | Buffer;
9817 buffer(): Buffer;
9818}
9819declare interface SourceData {
9820 iife?: boolean;
9821 init?: string;
9822 expression: string;
9823}
9824declare interface SourceLike {
9825 source(): string | Buffer;
9826}
9827declare class SourceMapDevToolPlugin {
9828 constructor(options?: SourceMapDevToolPluginOptions);
9829 sourceMapFilename: string | false;
9830 sourceMappingURLComment: string | false;
9831 moduleFilenameTemplate: string | Function;
9832 fallbackModuleFilenameTemplate: string | Function;
9833 namespace: string;
9834 options: SourceMapDevToolPluginOptions;
9835
9836 /**
9837 * Apply the plugin
9838 */
9839 apply(compiler: Compiler): void;
9840}
9841declare interface SourceMapDevToolPluginOptions {
9842 /**
9843 * Appends the given value to the original asset. Usually the #sourceMappingURL comment. [url] is replaced with a URL to the source map file. false disables the appending.
9844 */
9845 append?: null | string | false;
9846
9847 /**
9848 * Indicates whether column mappings should be used (defaults to true).
9849 */
9850 columns?: boolean;
9851
9852 /**
9853 * Exclude modules that match the given value from source map generation.
9854 */
9855 exclude?: string | RegExp | Rule[];
9856
9857 /**
9858 * Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap used only if 'moduleFilenameTemplate' would result in a conflict.
9859 */
9860 fallbackModuleFilenameTemplate?: string | Function;
9861
9862 /**
9863 * Path prefix to which the [file] placeholder is relative to.
9864 */
9865 fileContext?: string;
9866
9867 /**
9868 * Defines the output filename of the SourceMap (will be inlined if no value is provided).
9869 */
9870 filename?: null | string | false;
9871
9872 /**
9873 * Include source maps for module paths that match the given value.
9874 */
9875 include?: string | RegExp | Rule[];
9876
9877 /**
9878 * Indicates whether SourceMaps from loaders should be used (defaults to true).
9879 */
9880 module?: boolean;
9881
9882 /**
9883 * Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap.
9884 */
9885 moduleFilenameTemplate?: string | Function;
9886
9887 /**
9888 * Namespace prefix to allow multiple webpack roots in the devtools.
9889 */
9890 namespace?: string;
9891
9892 /**
9893 * Omit the 'sourceContents' array from the SourceMap.
9894 */
9895 noSources?: boolean;
9896
9897 /**
9898 * Provide a custom public path for the SourceMapping comment.
9899 */
9900 publicPath?: string;
9901
9902 /**
9903 * Provide a custom value for the 'sourceRoot' property in the SourceMap.
9904 */
9905 sourceRoot?: string;
9906
9907 /**
9908 * Include source maps for modules based on their extension (defaults to .js and .css).
9909 */
9910 test?: string | RegExp | Rule[];
9911}
9912declare class SourceMapSource extends Source {
9913 constructor(
9914 source: string | Buffer,
9915 name: string,
9916 sourceMap: string | Object | Buffer,
9917 originalSource?: string | Buffer,
9918 innerSourceMap?: string | Object | Buffer,
9919 removeOriginalSource?: boolean
9920 );
9921 getArgsAsBuffers(): [
9922 Buffer,
9923 string,
9924 Buffer,
9925 undefined | Buffer,
9926 undefined | Buffer,
9927 boolean
9928 ];
9929}
9930declare interface SourcePosition {
9931 line: number;
9932 column?: number;
9933}
9934declare interface SplitChunksOptions {
9935 chunksFilter: (chunk: Chunk) => boolean;
9936 defaultSizeTypes: string[];
9937 minSize: SplitChunksSizes;
9938 minRemainingSize: SplitChunksSizes;
9939 enforceSizeThreshold: SplitChunksSizes;
9940 maxInitialSize: SplitChunksSizes;
9941 maxAsyncSize: SplitChunksSizes;
9942 minChunks: number;
9943 maxAsyncRequests: number;
9944 maxInitialRequests: number;
9945 hidePathInfo: boolean;
9946 filename: string | ((arg0: PathData, arg1?: AssetInfo) => string);
9947 automaticNameDelimiter: string;
9948 getCacheGroups: (
9949 module: Module,
9950 context: CacheGroupsContext
9951 ) => CacheGroupSource[];
9952 getName: (
9953 module?: Module,
9954 chunks?: Chunk[],
9955 key?: string
9956 ) => undefined | string;
9957 usedExports: boolean;
9958 fallbackCacheGroup: FallbackCacheGroup;
9959}
9960declare class SplitChunksPlugin {
9961 constructor(options?: OptimizationSplitChunksOptions);
9962 options: SplitChunksOptions;
9963
9964 /**
9965 * Apply the plugin
9966 */
9967 apply(compiler: Compiler): void;
9968}
9969declare interface SplitChunksSizes {
9970 [index: string]: number;
9971}
9972declare abstract class StackedMap<K, V> {
9973 map: Map<K, InternalCell<V>>;
9974 stack: Map<K, InternalCell<V>>[];
9975 set(item: K, value: V): void;
9976 delete(item: K): void;
9977 has(item: K): boolean;
9978 get(item: K): Cell<V>;
9979 asArray(): K[];
9980 asSet(): Set<K>;
9981 asPairArray(): [K, Cell<V>][];
9982 asMap(): Map<K, Cell<V>>;
9983 readonly size: number;
9984 createChild(): StackedMap<K, V>;
9985}
9986type StartupRenderContext = RenderContextObject & { inlined: boolean };
9987type Statement =
9988 | FunctionDeclaration
9989 | VariableDeclaration
9990 | ClassDeclaration
9991 | ExpressionStatement
9992 | BlockStatement
9993 | EmptyStatement
9994 | DebuggerStatement
9995 | WithStatement
9996 | ReturnStatement
9997 | LabeledStatement
9998 | BreakStatement
9999 | ContinueStatement
10000 | IfStatement
10001 | SwitchStatement
10002 | ThrowStatement
10003 | TryStatement
10004 | WhileStatement
10005 | DoWhileStatement
10006 | ForStatement
10007 | ForInStatement
10008 | ForOfStatement;
10009declare class Stats {
10010 constructor(compilation: Compilation);
10011 compilation: Compilation;
10012 readonly hash?: string;
10013 readonly startTime: any;
10014 readonly endTime: any;
10015 hasWarnings(): boolean;
10016 hasErrors(): boolean;
10017 toJson(options?: string | StatsOptions): StatsCompilation;
10018 toString(options?: any): string;
10019}
10020type StatsAsset = KnownStatsAsset & Record<string, any>;
10021type StatsChunk = KnownStatsChunk & Record<string, any>;
10022type StatsChunkGroup = KnownStatsChunkGroup & Record<string, any>;
10023type StatsChunkOrigin = KnownStatsChunkOrigin & Record<string, any>;
10024type StatsCompilation = KnownStatsCompilation & Record<string, any>;
10025type StatsError = KnownStatsError & Record<string, any>;
10026declare abstract class StatsFactory {
10027 hooks: Readonly<{
10028 extract: HookMap<SyncBailHook<[Object, any, StatsFactoryContext], any>>;
10029 filter: HookMap<
10030 SyncBailHook<[any, StatsFactoryContext, number, number], any>
10031 >;
10032 sort: HookMap<
10033 SyncBailHook<
10034 [((arg0?: any, arg1?: any) => number)[], StatsFactoryContext],
10035 any
10036 >
10037 >;
10038 filterSorted: HookMap<
10039 SyncBailHook<[any, StatsFactoryContext, number, number], any>
10040 >;
10041 groupResults: HookMap<
10042 SyncBailHook<[GroupConfig[], StatsFactoryContext], any>
10043 >;
10044 sortResults: HookMap<
10045 SyncBailHook<
10046 [((arg0?: any, arg1?: any) => number)[], StatsFactoryContext],
10047 any
10048 >
10049 >;
10050 filterResults: HookMap<
10051 SyncBailHook<[any, StatsFactoryContext, number, number], any>
10052 >;
10053 merge: HookMap<SyncBailHook<[any[], StatsFactoryContext], any>>;
10054 result: HookMap<SyncBailHook<[any[], StatsFactoryContext], any>>;
10055 getItemName: HookMap<SyncBailHook<[any, StatsFactoryContext], any>>;
10056 getItemFactory: HookMap<SyncBailHook<[any, StatsFactoryContext], any>>;
10057 }>;
10058 create(
10059 type: string,
10060 data: any,
10061 baseContext: Omit<StatsFactoryContext, "type">
10062 ): any;
10063}
10064type StatsFactoryContext = KnownStatsFactoryContext & Record<string, any>;
10065type StatsLogging = KnownStatsLogging & Record<string, any>;
10066type StatsLoggingEntry = KnownStatsLoggingEntry & Record<string, any>;
10067type StatsModule = KnownStatsModule & Record<string, any>;
10068type StatsModuleIssuer = KnownStatsModuleIssuer & Record<string, any>;
10069type StatsModuleReason = KnownStatsModuleReason & Record<string, any>;
10070
10071/**
10072 * Stats options object.
10073 */
10074declare interface StatsOptions {
10075 /**
10076 * Fallback value for stats options when an option is not defined (has precedence over local webpack defaults).
10077 */
10078 all?: boolean;
10079
10080 /**
10081 * Add assets information.
10082 */
10083 assets?: boolean;
10084
10085 /**
10086 * Sort the assets by that field.
10087 */
10088 assetsSort?: string;
10089
10090 /**
10091 * Space to display assets (groups will be collapsed to fit this space).
10092 */
10093 assetsSpace?: number;
10094
10095 /**
10096 * Add built at time information.
10097 */
10098 builtAt?: boolean;
10099
10100 /**
10101 * Add information about cached (not built) modules (deprecated: use 'cachedModules' instead).
10102 */
10103 cached?: boolean;
10104
10105 /**
10106 * Show cached assets (setting this to `false` only shows emitted files).
10107 */
10108 cachedAssets?: boolean;
10109
10110 /**
10111 * Add information about cached (not built) modules.
10112 */
10113 cachedModules?: boolean;
10114
10115 /**
10116 * Add children information.
10117 */
10118 children?: boolean;
10119
10120 /**
10121 * Display auxiliary assets in chunk groups.
10122 */
10123 chunkGroupAuxiliary?: boolean;
10124
10125 /**
10126 * Display children of chunk groups.
10127 */
10128 chunkGroupChildren?: boolean;
10129
10130 /**
10131 * Limit of assets displayed in chunk groups.
10132 */
10133 chunkGroupMaxAssets?: number;
10134
10135 /**
10136 * Display all chunk groups with the corresponding bundles.
10137 */
10138 chunkGroups?: boolean;
10139
10140 /**
10141 * Add built modules information to chunk information.
10142 */
10143 chunkModules?: boolean;
10144
10145 /**
10146 * Space to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group).
10147 */
10148 chunkModulesSpace?: number;
10149
10150 /**
10151 * Add the origins of chunks and chunk merging info.
10152 */
10153 chunkOrigins?: boolean;
10154
10155 /**
10156 * Add information about parent, children and sibling chunks to chunk information.
10157 */
10158 chunkRelations?: boolean;
10159
10160 /**
10161 * Add chunk information.
10162 */
10163 chunks?: boolean;
10164
10165 /**
10166 * Sort the chunks by that field.
10167 */
10168 chunksSort?: string;
10169
10170 /**
10171 * Enables/Disables colorful output.
10172 */
10173 colors?:
10174 | boolean
10175 | {
10176 /**
10177 * Custom color for bold text.
10178 */
10179 bold?: string;
10180 /**
10181 * Custom color for cyan text.
10182 */
10183 cyan?: string;
10184 /**
10185 * Custom color for green text.
10186 */
10187 green?: string;
10188 /**
10189 * Custom color for magenta text.
10190 */
10191 magenta?: string;
10192 /**
10193 * Custom color for red text.
10194 */
10195 red?: string;
10196 /**
10197 * Custom color for yellow text.
10198 */
10199 yellow?: string;
10200 };
10201
10202 /**
10203 * Context directory for request shortening.
10204 */
10205 context?: string;
10206
10207 /**
10208 * Show chunk modules that are dependencies of other modules of the chunk.
10209 */
10210 dependentModules?: boolean;
10211
10212 /**
10213 * Add module depth in module graph.
10214 */
10215 depth?: boolean;
10216
10217 /**
10218 * Display the entry points with the corresponding bundles.
10219 */
10220 entrypoints?: boolean | "auto";
10221
10222 /**
10223 * Add --env information.
10224 */
10225 env?: boolean;
10226
10227 /**
10228 * Add details to errors (like resolving log).
10229 */
10230 errorDetails?: boolean | "auto";
10231
10232 /**
10233 * Add internal stack trace to errors.
10234 */
10235 errorStack?: boolean;
10236
10237 /**
10238 * Add errors.
10239 */
10240 errors?: boolean;
10241
10242 /**
10243 * Add errors count.
10244 */
10245 errorsCount?: boolean;
10246
10247 /**
10248 * Please use excludeModules instead.
10249 */
10250 exclude?:
10251 | string
10252 | boolean
10253 | RegExp
10254 | ModuleFilterItemTypes[]
10255 | ((
10256 name: string,
10257 module: StatsModule,
10258 type: "module" | "chunk" | "root-of-chunk" | "nested"
10259 ) => boolean);
10260
10261 /**
10262 * Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions.
10263 */
10264 excludeAssets?:
10265 | string
10266 | RegExp
10267 | AssetFilterItemTypes[]
10268 | ((name: string, asset: StatsAsset) => boolean);
10269
10270 /**
10271 * Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions.
10272 */
10273 excludeModules?:
10274 | string
10275 | boolean
10276 | RegExp
10277 | ModuleFilterItemTypes[]
10278 | ((
10279 name: string,
10280 module: StatsModule,
10281 type: "module" | "chunk" | "root-of-chunk" | "nested"
10282 ) => boolean);
10283
10284 /**
10285 * Group assets by how their are related to chunks.
10286 */
10287 groupAssetsByChunk?: boolean;
10288
10289 /**
10290 * Group assets by their status (emitted, compared for emit or cached).
10291 */
10292 groupAssetsByEmitStatus?: boolean;
10293
10294 /**
10295 * Group assets by their extension.
10296 */
10297 groupAssetsByExtension?: boolean;
10298
10299 /**
10300 * Group assets by their asset info (immutable, development, hotModuleReplacement, etc).
10301 */
10302 groupAssetsByInfo?: boolean;
10303
10304 /**
10305 * Group assets by their path.
10306 */
10307 groupAssetsByPath?: boolean;
10308
10309 /**
10310 * Group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent).
10311 */
10312 groupModulesByAttributes?: boolean;
10313
10314 /**
10315 * Group modules by their status (cached or built and cacheable).
10316 */
10317 groupModulesByCacheStatus?: boolean;
10318
10319 /**
10320 * Group modules by their extension.
10321 */
10322 groupModulesByExtension?: boolean;
10323
10324 /**
10325 * Group modules by their layer.
10326 */
10327 groupModulesByLayer?: boolean;
10328
10329 /**
10330 * Group modules by their path.
10331 */
10332 groupModulesByPath?: boolean;
10333
10334 /**
10335 * Add the hash of the compilation.
10336 */
10337 hash?: boolean;
10338
10339 /**
10340 * Add ids.
10341 */
10342 ids?: boolean;
10343
10344 /**
10345 * Add logging output.
10346 */
10347 logging?: boolean | "none" | "verbose" | "error" | "warn" | "info" | "log";
10348
10349 /**
10350 * Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions.
10351 */
10352 loggingDebug?:
10353 | string
10354 | boolean
10355 | RegExp
10356 | FilterItemTypes[]
10357 | ((value: string) => boolean);
10358
10359 /**
10360 * Add stack traces to logging output.
10361 */
10362 loggingTrace?: boolean;
10363
10364 /**
10365 * Add information about assets inside modules.
10366 */
10367 moduleAssets?: boolean;
10368
10369 /**
10370 * Add dependencies and origin of warnings/errors.
10371 */
10372 moduleTrace?: boolean;
10373
10374 /**
10375 * Add built modules information.
10376 */
10377 modules?: boolean;
10378
10379 /**
10380 * Sort the modules by that field.
10381 */
10382 modulesSort?: string;
10383
10384 /**
10385 * Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups).
10386 */
10387 modulesSpace?: number;
10388
10389 /**
10390 * Add information about modules nested in other modules (like with module concatenation).
10391 */
10392 nestedModules?: boolean;
10393
10394 /**
10395 * Space to display modules nested within other modules (groups will be collapsed to fit this space, value is in number of modules/group).
10396 */
10397 nestedModulesSpace?: number;
10398
10399 /**
10400 * Show reasons why optimization bailed out for modules.
10401 */
10402 optimizationBailout?: boolean;
10403
10404 /**
10405 * Add information about orphan modules.
10406 */
10407 orphanModules?: boolean;
10408
10409 /**
10410 * Add output path information.
10411 */
10412 outputPath?: boolean;
10413
10414 /**
10415 * Add performance hint flags.
10416 */
10417 performance?: boolean;
10418
10419 /**
10420 * Preset for the default values.
10421 */
10422 preset?: string | boolean;
10423
10424 /**
10425 * Show exports provided by modules.
10426 */
10427 providedExports?: boolean;
10428
10429 /**
10430 * Add public path information.
10431 */
10432 publicPath?: boolean;
10433
10434 /**
10435 * Add information about the reasons why modules are included.
10436 */
10437 reasons?: boolean;
10438
10439 /**
10440 * Add information about assets that are related to other assets (like SourceMaps for assets).
10441 */
10442 relatedAssets?: boolean;
10443
10444 /**
10445 * Add information about runtime modules (deprecated: use 'runtimeModules' instead).
10446 */
10447 runtime?: boolean;
10448
10449 /**
10450 * Add information about runtime modules.
10451 */
10452 runtimeModules?: boolean;
10453
10454 /**
10455 * Add the source code of modules.
10456 */
10457 source?: boolean;
10458
10459 /**
10460 * Add timing information.
10461 */
10462 timings?: boolean;
10463
10464 /**
10465 * Show exports used by modules.
10466 */
10467 usedExports?: boolean;
10468
10469 /**
10470 * Add webpack version information.
10471 */
10472 version?: boolean;
10473
10474 /**
10475 * Add warnings.
10476 */
10477 warnings?: boolean;
10478
10479 /**
10480 * Add warnings count.
10481 */
10482 warningsCount?: boolean;
10483
10484 /**
10485 * Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions.
10486 */
10487 warningsFilter?:
10488 | string
10489 | RegExp
10490 | WarningFilterItemTypes[]
10491 | ((warning: StatsError, value: string) => boolean);
10492}
10493declare abstract class StatsPrinter {
10494 hooks: Readonly<{
10495 sortElements: HookMap<SyncBailHook<[string[], StatsPrinterContext], true>>;
10496 printElements: HookMap<
10497 SyncBailHook<[PrintedElement[], StatsPrinterContext], string>
10498 >;
10499 sortItems: HookMap<SyncBailHook<[any[], StatsPrinterContext], true>>;
10500 getItemName: HookMap<SyncBailHook<[any, StatsPrinterContext], string>>;
10501 printItems: HookMap<SyncBailHook<[string[], StatsPrinterContext], string>>;
10502 print: HookMap<SyncBailHook<[{}, StatsPrinterContext], string>>;
10503 result: HookMap<SyncWaterfallHook<[string, StatsPrinterContext]>>;
10504 }>;
10505 print(type: string, object: Object, baseContext?: Object): string;
10506}
10507type StatsPrinterContext = KnownStatsPrinterContext & Record<string, any>;
10508type StatsProfile = KnownStatsProfile & Record<string, any>;
10509type StatsValue =
10510 | boolean
10511 | "none"
10512 | "summary"
10513 | "errors-only"
10514 | "errors-warnings"
10515 | "minimal"
10516 | "normal"
10517 | "detailed"
10518 | "verbose"
10519 | StatsOptions;
10520declare interface SyntheticDependencyLocation {
10521 name: string;
10522 index?: number;
10523}
10524declare const TOMBSTONE: unique symbol;
10525declare const TRANSITIVE_ONLY: unique symbol;
10526declare interface TagInfo {
10527 tag: any;
10528 data: any;
10529 next?: TagInfo;
10530}
10531declare class Template {
10532 constructor();
10533 static getFunctionContent(fn: Function): string;
10534 static toIdentifier(str: string): string;
10535 static toComment(str: string): string;
10536 static toNormalComment(str: string): string;
10537 static toPath(str: string): string;
10538 static numberToIdentifier(n: number): string;
10539 static numberToIdentifierContinuation(n: number): string;
10540 static indent(s: string | string[]): string;
10541 static prefix(s: string | string[], prefix: string): string;
10542 static asString(str: string | string[]): string;
10543 static getModulesArrayBounds(modules: WithId[]): false | [number, number];
10544 static renderChunkModules(
10545 renderContext: RenderContextModuleTemplate,
10546 modules: Module[],
10547 renderModule: (arg0: Module) => Source,
10548 prefix?: string
10549 ): Source;
10550 static renderRuntimeModules(
10551 runtimeModules: RuntimeModule[],
10552 renderContext: RenderContextModuleTemplate & {
10553 codeGenerationResults?: CodeGenerationResults;
10554 }
10555 ): Source;
10556 static renderChunkRuntimeModules(
10557 runtimeModules: RuntimeModule[],
10558 renderContext: RenderContextModuleTemplate
10559 ): Source;
10560 static NUMBER_OF_IDENTIFIER_START_CHARS: number;
10561 static NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS: number;
10562}
10563declare interface TimestampAndHash {
10564 safeTime: number;
10565 timestamp?: number;
10566 timestampHash?: string;
10567 hash: string;
10568}
10569declare const UNDEFINED_MARKER: unique symbol;
10570declare interface UpdateHashContextDependency {
10571 chunkGraph: ChunkGraph;
10572 runtime: RuntimeSpec;
10573 runtimeTemplate?: RuntimeTemplate;
10574}
10575declare interface UpdateHashContextGenerator {
10576 /**
10577 * the module
10578 */
10579 module: NormalModule;
10580 chunkGraph: ChunkGraph;
10581 runtime: RuntimeSpec;
10582}
10583type UsageStateType = 0 | 1 | 2 | 3 | 4;
10584declare interface UserResolveOptions {
10585 /**
10586 * A list of module alias configurations or an object which maps key to value
10587 */
10588 alias?: AliasOption[] | AliasOptions;
10589
10590 /**
10591 * A list of module alias configurations or an object which maps key to value, applied only after modules option
10592 */
10593 fallback?: AliasOption[] | AliasOptions;
10594
10595 /**
10596 * A list of alias fields in description files
10597 */
10598 aliasFields?: (string | string[])[];
10599
10600 /**
10601 * A function which decides whether a request should be cached or not. An object is passed with at least `path` and `request` properties.
10602 */
10603 cachePredicate?: (arg0: ResolveRequest) => boolean;
10604
10605 /**
10606 * Whether or not the unsafeCache should include request context as part of the cache key.
10607 */
10608 cacheWithContext?: boolean;
10609
10610 /**
10611 * A list of description files to read from
10612 */
10613 descriptionFiles?: string[];
10614
10615 /**
10616 * A list of exports field condition names.
10617 */
10618 conditionNames?: string[];
10619
10620 /**
10621 * Enforce that a extension from extensions must be used
10622 */
10623 enforceExtension?: boolean;
10624
10625 /**
10626 * A list of exports fields in description files
10627 */
10628 exportsFields?: (string | string[])[];
10629
10630 /**
10631 * A list of imports fields in description files
10632 */
10633 importsFields?: (string | string[])[];
10634
10635 /**
10636 * A list of extensions which should be tried for files
10637 */
10638 extensions?: string[];
10639
10640 /**
10641 * The file system which should be used
10642 */
10643 fileSystem: FileSystem;
10644
10645 /**
10646 * Use this cache object to unsafely cache the successful requests
10647 */
10648 unsafeCache?: boolean | object;
10649
10650 /**
10651 * Resolve symlinks to their symlinked location
10652 */
10653 symlinks?: boolean;
10654
10655 /**
10656 * A prepared Resolver to which the plugins are attached
10657 */
10658 resolver?: Resolver;
10659
10660 /**
10661 * A list of directories to resolve modules from, can be absolute path or folder name
10662 */
10663 modules?: string | string[];
10664
10665 /**
10666 * A list of main fields in description files
10667 */
10668 mainFields?: (
10669 | string
10670 | string[]
10671 | { name: string | string[]; forceRelative: boolean }
10672 )[];
10673
10674 /**
10675 * A list of main files in directories
10676 */
10677 mainFiles?: string[];
10678
10679 /**
10680 * A list of additional resolve plugins which should be applied
10681 */
10682 plugins?: Plugin[];
10683
10684 /**
10685 * A PnP API that should be used - null is "never", undefined is "auto"
10686 */
10687 pnpApi?: null | PnpApiImpl;
10688
10689 /**
10690 * A list of root paths
10691 */
10692 roots?: string[];
10693
10694 /**
10695 * The request is already fully specified and no extensions or directories are resolved for it
10696 */
10697 fullySpecified?: boolean;
10698
10699 /**
10700 * Resolve to a context instead of a file
10701 */
10702 resolveToContext?: boolean;
10703
10704 /**
10705 * A list of resolve restrictions
10706 */
10707 restrictions?: (string | RegExp)[];
10708
10709 /**
10710 * Use only the sync constiants of the file system calls
10711 */
10712 useSyncFileSystemCalls?: boolean;
10713
10714 /**
10715 * Prefer to resolve module requests as relative requests before falling back to modules
10716 */
10717 preferRelative?: boolean;
10718
10719 /**
10720 * Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots
10721 */
10722 preferAbsolute?: boolean;
10723}
10724declare abstract class VariableInfo {
10725 declaredScope: ScopeInfo;
10726 freeName: string | true;
10727 tagInfo?: TagInfo;
10728}
10729declare interface VariableInfoInterface {
10730 declaredScope: ScopeInfo;
10731 freeName: string | true;
10732 tagInfo?: TagInfo;
10733}
10734type WarningFilterItemTypes =
10735 | string
10736 | RegExp
10737 | ((warning: StatsError, value: string) => boolean);
10738declare interface WatchFileSystem {
10739 watch: (
10740 files: Iterable<string>,
10741 directories: Iterable<string>,
10742 missing: Iterable<string>,
10743 startTime: number,
10744 options: WatchOptions,
10745 callback: (
10746 arg0: undefined | Error,
10747 arg1: Map<string, FileSystemInfoEntry | "ignore">,
10748 arg2: Map<string, FileSystemInfoEntry | "ignore">,
10749 arg3: Set<string>,
10750 arg4: Set<string>
10751 ) => void,
10752 callbackUndelayed: (arg0: string, arg1: number) => void
10753 ) => Watcher;
10754}
10755declare class WatchIgnorePlugin {
10756 constructor(options: WatchIgnorePluginOptions);
10757 paths: (string | RegExp)[];
10758
10759 /**
10760 * Apply the plugin
10761 */
10762 apply(compiler: Compiler): void;
10763}
10764declare interface WatchIgnorePluginOptions {
10765 /**
10766 * A list of RegExps or absolute paths to directories or files that should be ignored.
10767 */
10768 paths: (string | RegExp)[];
10769}
10770
10771/**
10772 * Options for the watcher.
10773 */
10774declare interface WatchOptions {
10775 /**
10776 * Delay the rebuilt after the first change. Value is a time in ms.
10777 */
10778 aggregateTimeout?: number;
10779
10780 /**
10781 * Resolve symlinks and watch symlink and real file. This is usually not needed as webpack already resolves symlinks ('resolve.symlinks').
10782 */
10783 followSymlinks?: boolean;
10784
10785 /**
10786 * Ignore some files from watching (glob pattern or regexp).
10787 */
10788 ignored?: string | RegExp | string[];
10789
10790 /**
10791 * Enable polling mode for watching.
10792 */
10793 poll?: number | boolean;
10794
10795 /**
10796 * Stop watching when stdin stream has ended.
10797 */
10798 stdin?: boolean;
10799}
10800declare interface Watcher {
10801 /**
10802 * closes the watcher and all underlying file watchers
10803 */
10804 close: () => void;
10805
10806 /**
10807 * closes the watcher, but keeps underlying file watchers alive until the next watch call
10808 */
10809 pause: () => void;
10810
10811 /**
10812 * get current aggregated changes that have not yet send to callback
10813 */
10814 getAggregatedChanges?: () => Set<string>;
10815
10816 /**
10817 * get current aggregated removals that have not yet send to callback
10818 */
10819 getAggregatedRemovals?: () => Set<string>;
10820
10821 /**
10822 * get info about files
10823 */
10824 getFileTimeInfoEntries: () => Map<string, FileSystemInfoEntry | "ignore">;
10825
10826 /**
10827 * get info about directories
10828 */
10829 getContextTimeInfoEntries: () => Map<string, FileSystemInfoEntry | "ignore">;
10830}
10831declare abstract class Watching {
10832 startTime: null | number;
10833 invalid: boolean;
10834 handler: CallbackFunction<Stats>;
10835 callbacks: CallbackFunction<void>[];
10836 closed: boolean;
10837 suspended: boolean;
10838 blocked: boolean;
10839 watchOptions: {
10840 /**
10841 * Delay the rebuilt after the first change. Value is a time in ms.
10842 */
10843 aggregateTimeout?: number;
10844 /**
10845 * Resolve symlinks and watch symlink and real file. This is usually not needed as webpack already resolves symlinks ('resolve.symlinks').
10846 */
10847 followSymlinks?: boolean;
10848 /**
10849 * Ignore some files from watching (glob pattern or regexp).
10850 */
10851 ignored?: string | RegExp | string[];
10852 /**
10853 * Enable polling mode for watching.
10854 */
10855 poll?: number | boolean;
10856 /**
10857 * Stop watching when stdin stream has ended.
10858 */
10859 stdin?: boolean;
10860 };
10861 compiler: Compiler;
10862 running: boolean;
10863 watcher: any;
10864 pausedWatcher: any;
10865 watch(
10866 files: Iterable<string>,
10867 dirs: Iterable<string>,
10868 missing: Iterable<string>
10869 ): void;
10870 invalidate(callback?: CallbackFunction<void>): void;
10871 suspend(): void;
10872 resume(): void;
10873 close(callback: CallbackFunction<void>): void;
10874}
10875declare class WebWorkerTemplatePlugin {
10876 constructor();
10877
10878 /**
10879 * Apply the plugin
10880 */
10881 apply(compiler: Compiler): void;
10882}
10883declare class WebpackError extends Error {
10884 /**
10885 * Creates an instance of WebpackError.
10886 */
10887 constructor(message?: string);
10888 details: any;
10889 module: Module;
10890 loc: DependencyLocation;
10891 hideStack: boolean;
10892 chunk: Chunk;
10893 file: string;
10894 serialize(__0: { write: any }): void;
10895 deserialize(__0: { read: any }): void;
10896
10897 /**
10898 * Create .stack property on a target object
10899 */
10900 static captureStackTrace(
10901 targetObject: object,
10902 constructorOpt?: Function
10903 ): void;
10904
10905 /**
10906 * Optional override for formatting stack traces
10907 */
10908 static prepareStackTrace?: (
10909 err: Error,
10910 stackTraces: NodeJS.CallSite[]
10911 ) => any;
10912 static stackTraceLimit: number;
10913}
10914declare abstract class WebpackLogger {
10915 getChildLogger: (arg0: string | (() => string)) => WebpackLogger;
10916 error(...args: any[]): void;
10917 warn(...args: any[]): void;
10918 info(...args: any[]): void;
10919 log(...args: any[]): void;
10920 debug(...args: any[]): void;
10921 assert(assertion: any, ...args: any[]): void;
10922 trace(): void;
10923 clear(): void;
10924 status(...args: any[]): void;
10925 group(...args: any[]): void;
10926 groupCollapsed(...args: any[]): void;
10927 groupEnd(...args: any[]): void;
10928 profile(label?: any): void;
10929 profileEnd(label?: any): void;
10930 time(label?: any): void;
10931 timeLog(label?: any): void;
10932 timeEnd(label?: any): void;
10933 timeAggregate(label?: any): void;
10934 timeAggregateEnd(label?: any): void;
10935}
10936declare class WebpackOptionsApply extends OptionsApply {
10937 constructor();
10938}
10939declare class WebpackOptionsDefaulter {
10940 constructor();
10941 process(options?: any): any;
10942}
10943
10944/**
10945 * Normalized webpack options object.
10946 */
10947declare interface WebpackOptionsNormalized {
10948 /**
10949 * Set the value of `require.amd` and `define.amd`. Or disable AMD support.
10950 */
10951 amd?: false | { [index: string]: any };
10952
10953 /**
10954 * Report the first error as a hard error instead of tolerating it.
10955 */
10956 bail?: boolean;
10957
10958 /**
10959 * Cache generated modules and chunks to improve performance for multiple incremental builds.
10960 */
10961 cache: CacheOptionsNormalized;
10962
10963 /**
10964 * The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
10965 */
10966 context?: string;
10967
10968 /**
10969 * References to other configurations to depend on.
10970 */
10971 dependencies?: string[];
10972
10973 /**
10974 * Options for the webpack-dev-server.
10975 */
10976 devServer?: DevServer;
10977
10978 /**
10979 * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
10980 */
10981 devtool?: string | false;
10982
10983 /**
10984 * The entry point(s) of the compilation.
10985 */
10986 entry: EntryNormalized;
10987
10988 /**
10989 * Enables/Disables experiments (experimental features with relax SemVer compatibility).
10990 */
10991 experiments: Experiments;
10992
10993 /**
10994 * 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`.
10995 */
10996 externals: Externals;
10997
10998 /**
10999 * Enable presets of externals for specific targets.
11000 */
11001 externalsPresets: ExternalsPresets;
11002
11003 /**
11004 * Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
11005 */
11006 externalsType?:
11007 | "var"
11008 | "module"
11009 | "assign"
11010 | "this"
11011 | "window"
11012 | "self"
11013 | "global"
11014 | "commonjs"
11015 | "commonjs2"
11016 | "commonjs-module"
11017 | "amd"
11018 | "amd-require"
11019 | "umd"
11020 | "umd2"
11021 | "jsonp"
11022 | "system"
11023 | "promise"
11024 | "import"
11025 | "script";
11026
11027 /**
11028 * Ignore specific warnings.
11029 */
11030 ignoreWarnings?: ((
11031 warning: WebpackError,
11032 compilation: Compilation
11033 ) => boolean)[];
11034
11035 /**
11036 * Options for infrastructure level logging.
11037 */
11038 infrastructureLogging: InfrastructureLogging;
11039
11040 /**
11041 * Custom values available in the loader context.
11042 */
11043 loader?: Loader;
11044
11045 /**
11046 * Enable production optimizations or development hints.
11047 */
11048 mode?: "development" | "production" | "none";
11049
11050 /**
11051 * Options affecting the normal modules (`NormalModuleFactory`).
11052 */
11053 module: ModuleOptionsNormalized;
11054
11055 /**
11056 * Name of the configuration. Used when loading multiple configurations.
11057 */
11058 name?: string;
11059
11060 /**
11061 * Include polyfills or mocks for various node stuff.
11062 */
11063 node: NodeWebpackOptions;
11064
11065 /**
11066 * Enables/Disables integrated optimizations.
11067 */
11068 optimization: Optimization;
11069
11070 /**
11071 * Normalized options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
11072 */
11073 output: OutputNormalized;
11074
11075 /**
11076 * The number of parallel processed modules in the compilation.
11077 */
11078 parallelism?: number;
11079
11080 /**
11081 * Configuration for web performance recommendations.
11082 */
11083 performance?: false | PerformanceOptions;
11084
11085 /**
11086 * Add additional plugins to the compiler.
11087 */
11088 plugins: (
11089 | ((this: Compiler, compiler: Compiler) => void)
11090 | WebpackPluginInstance
11091 )[];
11092
11093 /**
11094 * Capture timing information for each module.
11095 */
11096 profile?: boolean;
11097
11098 /**
11099 * Store compiler state to a json file.
11100 */
11101 recordsInputPath?: string | false;
11102
11103 /**
11104 * Load compiler state from a json file.
11105 */
11106 recordsOutputPath?: string | false;
11107
11108 /**
11109 * Options for the resolver.
11110 */
11111 resolve: ResolveOptionsWebpackOptions;
11112
11113 /**
11114 * Options for the resolver when resolving loaders.
11115 */
11116 resolveLoader: ResolveOptionsWebpackOptions;
11117
11118 /**
11119 * Options affecting how file system snapshots are created and validated.
11120 */
11121 snapshot: SnapshotOptions;
11122
11123 /**
11124 * Stats options object or preset name.
11125 */
11126 stats: StatsValue;
11127
11128 /**
11129 * Environment to build for. An array of environments to build for all of them when possible.
11130 */
11131 target?: string | false | string[];
11132
11133 /**
11134 * Enter watch mode, which rebuilds on file change.
11135 */
11136 watch?: boolean;
11137
11138 /**
11139 * Options for the watcher.
11140 */
11141 watchOptions: WatchOptions;
11142}
11143
11144/**
11145 * Plugin instance.
11146 */
11147declare interface WebpackPluginInstance {
11148 [index: string]: any;
11149
11150 /**
11151 * The run point of the plugin, required method.
11152 */
11153 apply: (compiler: Compiler) => void;
11154}
11155declare interface WithId {
11156 id: string | number;
11157}
11158declare interface WithOptions {
11159 /**
11160 * create a resolver with additional/different options
11161 */
11162 withOptions: (
11163 arg0: Partial<ResolveOptionsWithDependencyType>
11164 ) => ResolverWithOptions;
11165}
11166declare interface WriteOnlySet<T> {
11167 add: (T?: any) => void;
11168}
11169type __TypeWebpackOptions = (
11170 data: object
11171) =>
11172 | string
11173 | {
11174 /**
11175 * Unique loader options identifier.
11176 */
11177 ident?: string;
11178 /**
11179 * Loader name.
11180 */
11181 loader?: string;
11182 /**
11183 * Loader options.
11184 */
11185 options?: string | { [index: string]: any };
11186 }
11187 | __TypeWebpackOptions
11188 | RuleSetUseItem[];
11189declare function exports(
11190 options: Configuration,
11191 callback?: CallbackWebpack<Stats>
11192): Compiler;
11193declare function exports(
11194 options: Configuration[] & MultiCompilerOptions,
11195 callback?: CallbackWebpack<MultiStats>
11196): MultiCompiler;
11197declare namespace exports {
11198 export const webpack: {
11199 (options: Configuration, callback?: CallbackWebpack<Stats>): Compiler;
11200 (
11201 options: Configuration[] & MultiCompilerOptions,
11202 callback?: CallbackWebpack<MultiStats>
11203 ): MultiCompiler;
11204 };
11205 export const validate: (options?: any) => void;
11206 export const validateSchema: (
11207 schema: Schema,
11208 options: object | object[],
11209 validationConfiguration?: ValidationErrorConfiguration
11210 ) => void;
11211 export const version: string;
11212 export namespace cli {
11213 export let getArguments: (schema?: any) => Record<string, Argument>;
11214 export let processArguments: (
11215 args: Record<string, Argument>,
11216 config: any,
11217 values: Record<
11218 string,
11219 | string
11220 | number
11221 | boolean
11222 | RegExp
11223 | (string | number | boolean | RegExp)[]
11224 >
11225 ) => null | Problem[];
11226 }
11227 export namespace ModuleFilenameHelpers {
11228 export let ALL_LOADERS_RESOURCE: string;
11229 export let REGEXP_ALL_LOADERS_RESOURCE: RegExp;
11230 export let LOADERS_RESOURCE: string;
11231 export let REGEXP_LOADERS_RESOURCE: RegExp;
11232 export let RESOURCE: string;
11233 export let REGEXP_RESOURCE: RegExp;
11234 export let ABSOLUTE_RESOURCE_PATH: string;
11235 export let REGEXP_ABSOLUTE_RESOURCE_PATH: RegExp;
11236 export let RESOURCE_PATH: string;
11237 export let REGEXP_RESOURCE_PATH: RegExp;
11238 export let ALL_LOADERS: string;
11239 export let REGEXP_ALL_LOADERS: RegExp;
11240 export let LOADERS: string;
11241 export let REGEXP_LOADERS: RegExp;
11242 export let QUERY: string;
11243 export let REGEXP_QUERY: RegExp;
11244 export let ID: string;
11245 export let REGEXP_ID: RegExp;
11246 export let HASH: string;
11247 export let REGEXP_HASH: RegExp;
11248 export let NAMESPACE: string;
11249 export let REGEXP_NAMESPACE: RegExp;
11250 export let createFilename: (
11251 module: any,
11252 options: any,
11253 __2: { requestShortener: any; chunkGraph: any }
11254 ) => any;
11255 export let replaceDuplicates: (
11256 array?: any,
11257 fn?: any,
11258 comparator?: any
11259 ) => any;
11260 export let matchPart: (str?: any, test?: any) => any;
11261 export let matchObject: (obj?: any, str?: any) => boolean;
11262 }
11263 export namespace RuntimeGlobals {
11264 export let require: string;
11265 export let requireScope: string;
11266 export let exports: string;
11267 export let thisAsExports: string;
11268 export let returnExportsFromRuntime: string;
11269 export let module: string;
11270 export let moduleId: string;
11271 export let moduleLoaded: string;
11272 export let publicPath: string;
11273 export let entryModuleId: string;
11274 export let moduleCache: string;
11275 export let moduleFactories: string;
11276 export let moduleFactoriesAddOnly: string;
11277 export let ensureChunk: string;
11278 export let ensureChunkHandlers: string;
11279 export let ensureChunkIncludeEntries: string;
11280 export let prefetchChunk: string;
11281 export let prefetchChunkHandlers: string;
11282 export let preloadChunk: string;
11283 export let preloadChunkHandlers: string;
11284 export let definePropertyGetters: string;
11285 export let makeNamespaceObject: string;
11286 export let createFakeNamespaceObject: string;
11287 export let compatGetDefaultExport: string;
11288 export let harmonyModuleDecorator: string;
11289 export let nodeModuleDecorator: string;
11290 export let getFullHash: string;
11291 export let wasmInstances: string;
11292 export let instantiateWasm: string;
11293 export let uncaughtErrorHandler: string;
11294 export let scriptNonce: string;
11295 export let loadScript: string;
11296 export let chunkName: string;
11297 export let runtimeId: string;
11298 export let getChunkScriptFilename: string;
11299 export let getChunkUpdateScriptFilename: string;
11300 export let startup: string;
11301 export let startupNoDefault: string;
11302 export let startupOnlyAfter: string;
11303 export let startupOnlyBefore: string;
11304 export let chunkCallback: string;
11305 export let startupEntrypoint: string;
11306 export let onChunksLoaded: string;
11307 export let externalInstallChunk: string;
11308 export let interceptModuleExecution: string;
11309 export let global: string;
11310 export let shareScopeMap: string;
11311 export let initializeSharing: string;
11312 export let currentRemoteGetScope: string;
11313 export let getUpdateManifestFilename: string;
11314 export let hmrDownloadManifest: string;
11315 export let hmrDownloadUpdateHandlers: string;
11316 export let hmrModuleData: string;
11317 export let hmrInvalidateModuleHandlers: string;
11318 export let amdDefine: string;
11319 export let amdOptions: string;
11320 export let system: string;
11321 export let hasOwnProperty: string;
11322 export let systemContext: string;
11323 export let baseURI: string;
11324 export let relativeUrl: string;
11325 export let asyncModule: string;
11326 }
11327 export const UsageState: Readonly<{
11328 Unused: 0;
11329 OnlyPropertiesUsed: 1;
11330 NoInfo: 2;
11331 Unknown: 3;
11332 Used: 4;
11333 }>;
11334 export const WebpackOptionsValidationError: ValidationError;
11335 export const ValidationError: ValidationError;
11336 export namespace cache {
11337 export { MemoryCachePlugin };
11338 }
11339 export namespace config {
11340 export const getNormalizedWebpackOptions: (
11341 config: Configuration
11342 ) => WebpackOptionsNormalized;
11343 export const applyWebpackOptionsDefaults: (
11344 options: WebpackOptionsNormalized
11345 ) => void;
11346 }
11347 export namespace ids {
11348 export {
11349 ChunkModuleIdRangePlugin,
11350 NaturalModuleIdsPlugin,
11351 OccurrenceModuleIdsPlugin,
11352 NamedModuleIdsPlugin,
11353 DeterministicChunkIdsPlugin,
11354 DeterministicModuleIdsPlugin,
11355 NamedChunkIdsPlugin,
11356 OccurrenceChunkIdsPlugin,
11357 HashedModuleIdsPlugin
11358 };
11359 }
11360 export namespace javascript {
11361 export {
11362 EnableChunkLoadingPlugin,
11363 JavascriptModulesPlugin,
11364 JavascriptParser
11365 };
11366 }
11367 export namespace optimize {
11368 export {
11369 AggressiveMergingPlugin,
11370 AggressiveSplittingPlugin,
11371 LimitChunkCountPlugin,
11372 MinChunkSizePlugin,
11373 ModuleConcatenationPlugin,
11374 RealContentHashPlugin,
11375 RuntimeChunkPlugin,
11376 SideEffectsFlagPlugin,
11377 SplitChunksPlugin
11378 };
11379 }
11380 export namespace runtime {
11381 export { GetChunkFilenameRuntimeModule, LoadScriptRuntimeModule };
11382 }
11383 export namespace prefetch {
11384 export { ChunkPrefetchPreloadPlugin };
11385 }
11386 export namespace web {
11387 export {
11388 FetchCompileAsyncWasmPlugin,
11389 FetchCompileWasmPlugin,
11390 JsonpChunkLoadingRuntimeModule,
11391 JsonpTemplatePlugin
11392 };
11393 }
11394 export namespace webworker {
11395 export { WebWorkerTemplatePlugin };
11396 }
11397 export namespace node {
11398 export {
11399 NodeEnvironmentPlugin,
11400 NodeSourcePlugin,
11401 NodeTargetPlugin,
11402 NodeTemplatePlugin,
11403 ReadFileCompileWasmPlugin
11404 };
11405 }
11406 export namespace electron {
11407 export { ElectronTargetPlugin };
11408 }
11409 export namespace wasm {
11410 export { AsyncWebAssemblyModulesPlugin };
11411 }
11412 export namespace library {
11413 export { AbstractLibraryPlugin, EnableLibraryPlugin };
11414 }
11415 export namespace container {
11416 export const scope: <T>(
11417 scope: string,
11418 options: ContainerOptionsFormat<T>
11419 ) => Record<string, string | string[] | T>;
11420 export {
11421 ContainerPlugin,
11422 ContainerReferencePlugin,
11423 ModuleFederationPlugin
11424 };
11425 }
11426 export namespace sharing {
11427 export const scope: <T>(
11428 scope: string,
11429 options: ContainerOptionsFormat<T>
11430 ) => Record<string, string | string[] | T>;
11431 export { ConsumeSharedPlugin, ProvideSharedPlugin, SharePlugin };
11432 }
11433 export namespace debug {
11434 export { ProfilingPlugin };
11435 }
11436 export namespace util {
11437 export const createHash: (algorithm: string | typeof Hash) => Hash;
11438 export namespace comparators {
11439 export let compareChunksById: (a: Chunk, b: Chunk) => 0 | 1 | -1;
11440 export let compareModulesByIdentifier: (
11441 a: Module,
11442 b: Module
11443 ) => 0 | 1 | -1;
11444 export let compareModulesById: ParameterizedComparator<
11445 ChunkGraph,
11446 Module
11447 >;
11448 export let compareNumbers: (a: number, b: number) => 0 | 1 | -1;
11449 export let compareStringsNumeric: (a: string, b: string) => 0 | 1 | -1;
11450 export let compareModulesByPostOrderIndexOrIdentifier: ParameterizedComparator<
11451 ModuleGraph,
11452 Module
11453 >;
11454 export let compareModulesByPreOrderIndexOrIdentifier: ParameterizedComparator<
11455 ModuleGraph,
11456 Module
11457 >;
11458 export let compareModulesByIdOrIdentifier: ParameterizedComparator<
11459 ChunkGraph,
11460 Module
11461 >;
11462 export let compareChunks: ParameterizedComparator<ChunkGraph, Chunk>;
11463 export let compareIds: (
11464 a: string | number,
11465 b: string | number
11466 ) => 0 | 1 | -1;
11467 export let compareStrings: (a: string, b: string) => 0 | 1 | -1;
11468 export let compareChunkGroupsByIndex: (
11469 a: ChunkGroup,
11470 b: ChunkGroup
11471 ) => 0 | 1 | -1;
11472 export let concatComparators: <T>(
11473 c1: Comparator<T>,
11474 c2: Comparator<T>,
11475 ...cRest: Comparator<T>[]
11476 ) => Comparator<T>;
11477 export let compareSelect: <T, R>(
11478 getter: Selector<T, R>,
11479 comparator: Comparator<R>
11480 ) => Comparator<T>;
11481 export let compareIterables: <T>(
11482 elementComparator: Comparator<T>
11483 ) => Comparator<Iterable<T>>;
11484 export let keepOriginalOrder: <T>(iterable: Iterable<T>) => Comparator<T>;
11485 export let compareChunksNatural: (
11486 chunkGraph: ChunkGraph
11487 ) => Comparator<Chunk>;
11488 export let compareLocations: (
11489 a: DependencyLocation,
11490 b: DependencyLocation
11491 ) => 0 | 1 | -1;
11492 }
11493 export namespace serialization {
11494 export let register: (
11495 Constructor: Constructor,
11496 request: string,
11497 name: string,
11498 serializer: ObjectSerializer
11499 ) => void;
11500 export let registerLoader: (
11501 regExp: RegExp,
11502 loader: (arg0: string) => boolean
11503 ) => void;
11504 export let registerNotSerializable: (Constructor: Constructor) => void;
11505 export let NOT_SERIALIZABLE: object;
11506 export let buffersSerializer: Serializer;
11507 export let createFileSerializer: (fs?: any) => Serializer;
11508 export { MEASURE_START_OPERATION, MEASURE_END_OPERATION };
11509 }
11510 export const cleverMerge: <T, O>(first: T, second: O) => T | O | (T & O);
11511 export { LazySet };
11512 }
11513 export namespace sources {
11514 export {
11515 Source,
11516 RawSource,
11517 OriginalSource,
11518 ReplaceSource,
11519 SourceMapSource,
11520 ConcatSource,
11521 PrefixSource,
11522 CachedSource,
11523 SizeOnlySource,
11524 CompatSource
11525 };
11526 }
11527 export namespace experiments {
11528 export namespace schemes {
11529 export { HttpUriPlugin, HttpsUriPlugin };
11530 }
11531 }
11532 export type WebpackPluginFunction = (
11533 this: Compiler,
11534 compiler: Compiler
11535 ) => void;
11536 export {
11537 AutomaticPrefetchPlugin,
11538 BannerPlugin,
11539 Cache,
11540 Chunk,
11541 ChunkGraph,
11542 CleanPlugin,
11543 Compilation,
11544 Compiler,
11545 ConcatenationScope,
11546 ContextExclusionPlugin,
11547 ContextReplacementPlugin,
11548 DefinePlugin,
11549 DelegatedPlugin,
11550 Dependency,
11551 DllPlugin,
11552 DllReferencePlugin,
11553 DynamicEntryPlugin,
11554 EntryOptionPlugin,
11555 EntryPlugin,
11556 EnvironmentPlugin,
11557 EvalDevToolModulePlugin,
11558 EvalSourceMapDevToolPlugin,
11559 ExternalModule,
11560 ExternalsPlugin,
11561 Generator,
11562 HotUpdateChunk,
11563 HotModuleReplacementPlugin,
11564 IgnorePlugin,
11565 JavascriptModulesPlugin,
11566 LibManifestPlugin,
11567 LibraryTemplatePlugin,
11568 LoaderOptionsPlugin,
11569 LoaderTargetPlugin,
11570 Module,
11571 ModuleGraph,
11572 ModuleGraphConnection,
11573 NoEmitOnErrorsPlugin,
11574 NormalModule,
11575 NormalModuleReplacementPlugin,
11576 MultiCompiler,
11577 Parser,
11578 PrefetchPlugin,
11579 ProgressPlugin,
11580 ProvidePlugin,
11581 RuntimeModule,
11582 EntryPlugin as SingleEntryPlugin,
11583 SourceMapDevToolPlugin,
11584 Stats,
11585 Template,
11586 WatchIgnorePlugin,
11587 WebpackError,
11588 WebpackOptionsApply,
11589 WebpackOptionsDefaulter,
11590 Entry,
11591 EntryNormalized,
11592 EntryObject,
11593 LibraryOptions,
11594 ModuleOptions,
11595 ResolveOptionsWebpackOptions as ResolveOptions,
11596 RuleSetCondition,
11597 RuleSetConditionAbsolute,
11598 RuleSetRule,
11599 RuleSetUse,
11600 RuleSetUseItem,
11601 Configuration,
11602 WebpackOptionsNormalized,
11603 WebpackPluginInstance,
11604 Asset,
11605 AssetInfo,
11606 MultiStats,
11607 ParserState,
11608 Watching,
11609 StatsCompilation
11610 };
11611}
11612
11613export = exports;