UNPKG

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