UNPKG

339 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 get entryModule(): Module;
735 hasEntryModule(): boolean;
736 addModule(module: Module): boolean;
737 removeModule(module: Module): void;
738 getNumberOfModules(): number;
739 get 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 get 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 get debugId(): string;
986
987 /**
988 * get a unique id for ChunkGroup, made up of its member Chunk id's
989 */
990 get 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 get 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 get parentsIterable(): SortableSet<ChunkGroup>;
1019 removeParent(chunkGroup: ChunkGroup): boolean;
1020 addAsyncEntrypoint(entrypoint: Entrypoint): boolean;
1021 get asyncEntrypointsIterable(): SortableSet<ChunkGroup>;
1022 getBlocks(): any[];
1023 getNumberOfBlocks(): number;
1024 hasBlock(block?: any): boolean;
1025 get 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 get 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 get 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 get type(): string;
2657 get 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 get 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}
3136declare class EnableWasmLoadingPlugin {
3137 constructor(type: string);
3138 type: string;
3139
3140 /**
3141 * Apply the plugin
3142 */
3143 apply(compiler: Compiler): void;
3144 static setEnabled(compiler: Compiler, type: string): void;
3145 static checkEnabled(compiler: Compiler, type: string): void;
3146}
3147type Entry =
3148 | string
3149 | (() => string | EntryObject | string[] | Promise<EntryStatic>)
3150 | EntryObject
3151 | string[];
3152declare interface EntryData {
3153 /**
3154 * dependencies of the entrypoint that should be evaluated at startup
3155 */
3156 dependencies: Dependency[];
3157
3158 /**
3159 * dependencies of the entrypoint that should be included but not evaluated
3160 */
3161 includeDependencies: Dependency[];
3162
3163 /**
3164 * options of the entrypoint
3165 */
3166 options: EntryOptions;
3167}
3168declare abstract class EntryDependency extends ModuleDependency {}
3169
3170/**
3171 * An object with entry point description.
3172 */
3173declare interface EntryDescription {
3174 /**
3175 * Enable/disable creating async chunks that are loaded on demand.
3176 */
3177 asyncChunks?: boolean;
3178
3179 /**
3180 * Base uri for this entry.
3181 */
3182 baseUri?: string;
3183
3184 /**
3185 * 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).
3186 */
3187 chunkLoading?: string | false;
3188
3189 /**
3190 * The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.
3191 */
3192 dependOn?: string | string[];
3193
3194 /**
3195 * 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.
3196 */
3197 filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
3198
3199 /**
3200 * Module(s) that are loaded upon startup.
3201 */
3202 import: EntryItem;
3203
3204 /**
3205 * Specifies the layer in which modules of this entrypoint are placed.
3206 */
3207 layer?: null | string;
3208
3209 /**
3210 * Options for library.
3211 */
3212 library?: LibraryOptions;
3213
3214 /**
3215 * The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
3216 */
3217 publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
3218
3219 /**
3220 * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
3221 */
3222 runtime?: string | false;
3223
3224 /**
3225 * 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).
3226 */
3227 wasmLoading?: string | false;
3228}
3229
3230/**
3231 * An object with entry point description.
3232 */
3233declare interface EntryDescriptionNormalized {
3234 /**
3235 * Enable/disable creating async chunks that are loaded on demand.
3236 */
3237 asyncChunks?: boolean;
3238
3239 /**
3240 * Base uri for this entry.
3241 */
3242 baseUri?: string;
3243
3244 /**
3245 * 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).
3246 */
3247 chunkLoading?: string | false;
3248
3249 /**
3250 * The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.
3251 */
3252 dependOn?: string[];
3253
3254 /**
3255 * 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.
3256 */
3257 filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
3258
3259 /**
3260 * Module(s) that are loaded upon startup. The last one is exported.
3261 */
3262 import?: string[];
3263
3264 /**
3265 * Specifies the layer in which modules of this entrypoint are placed.
3266 */
3267 layer?: null | string;
3268
3269 /**
3270 * Options for library.
3271 */
3272 library?: LibraryOptions;
3273
3274 /**
3275 * The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
3276 */
3277 publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
3278
3279 /**
3280 * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
3281 */
3282 runtime?: string | false;
3283
3284 /**
3285 * 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).
3286 */
3287 wasmLoading?: string | false;
3288}
3289type EntryItem = string | string[];
3290type EntryNormalized =
3291 | (() => Promise<EntryStaticNormalized>)
3292 | EntryStaticNormalized;
3293
3294/**
3295 * Multiple entry bundles are created. The key is the entry name. The value can be a string, an array or an entry description object.
3296 */
3297declare interface EntryObject {
3298 [index: string]: string | string[] | EntryDescription;
3299}
3300declare class EntryOptionPlugin {
3301 constructor();
3302 apply(compiler: Compiler): void;
3303 static applyEntryOption(
3304 compiler: Compiler,
3305 context: string,
3306 entry: EntryNormalized
3307 ): void;
3308 static entryDescriptionToOptions(
3309 compiler: Compiler,
3310 name: string,
3311 desc: EntryDescriptionNormalized
3312 ): EntryOptions;
3313}
3314type EntryOptions = { name?: string } & Omit<
3315 EntryDescriptionNormalized,
3316 "import"
3317>;
3318declare class EntryPlugin {
3319 /**
3320 * An entry plugin which will handle
3321 * creation of the EntryDependency
3322 */
3323 constructor(context: string, entry: string, options?: string | EntryOptions);
3324 context: string;
3325 entry: string;
3326 options: string | EntryOptions;
3327
3328 /**
3329 * Apply the plugin
3330 */
3331 apply(compiler: Compiler): void;
3332 static createDependency(
3333 entry: string,
3334 options: string | EntryOptions
3335 ): EntryDependency;
3336}
3337type EntryStatic = string | EntryObject | string[];
3338
3339/**
3340 * Multiple entry bundles are created. The key is the entry name. The value is an entry description object.
3341 */
3342declare interface EntryStaticNormalized {
3343 [index: string]: EntryDescriptionNormalized;
3344}
3345declare abstract class Entrypoint extends ChunkGroup {
3346 /**
3347 * Sets the runtimeChunk for an entrypoint.
3348 */
3349 setRuntimeChunk(chunk: Chunk): void;
3350
3351 /**
3352 * Fetches the chunk reference containing the webpack bootstrap code
3353 */
3354 getRuntimeChunk(): null | Chunk;
3355
3356 /**
3357 * Sets the chunk with the entrypoint modules for an entrypoint.
3358 */
3359 setEntrypointChunk(chunk: Chunk): void;
3360
3361 /**
3362 * Returns the chunk which contains the entrypoint modules
3363 * (or at least the execution of them)
3364 */
3365 getEntrypointChunk(): Chunk;
3366}
3367
3368/**
3369 * The abilities of the environment where the webpack generated code should run.
3370 */
3371declare interface Environment {
3372 /**
3373 * The environment supports arrow functions ('() => { ... }').
3374 */
3375 arrowFunction?: boolean;
3376
3377 /**
3378 * The environment supports BigInt as literal (123n).
3379 */
3380 bigIntLiteral?: boolean;
3381
3382 /**
3383 * The environment supports const and let for variable declarations.
3384 */
3385 const?: boolean;
3386
3387 /**
3388 * The environment supports destructuring ('{ a, b } = obj').
3389 */
3390 destructuring?: boolean;
3391
3392 /**
3393 * The environment supports an async import() function to import EcmaScript modules.
3394 */
3395 dynamicImport?: boolean;
3396
3397 /**
3398 * The environment supports 'for of' iteration ('for (const x of array) { ... }').
3399 */
3400 forOf?: boolean;
3401
3402 /**
3403 * The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').
3404 */
3405 module?: boolean;
3406
3407 /**
3408 * The environment supports optional chaining ('obj?.a' or 'obj?.()').
3409 */
3410 optionalChaining?: boolean;
3411
3412 /**
3413 * The environment supports template literals.
3414 */
3415 templateLiteral?: boolean;
3416}
3417declare class EnvironmentPlugin {
3418 constructor(...keys: any[]);
3419 keys: any[];
3420 defaultValues: any;
3421
3422 /**
3423 * Apply the plugin
3424 */
3425 apply(compiler: Compiler): void;
3426}
3427declare interface Etag {
3428 toString: () => string;
3429}
3430declare class EvalDevToolModulePlugin {
3431 constructor(options?: any);
3432 namespace: any;
3433 sourceUrlComment: any;
3434 moduleFilenameTemplate: any;
3435
3436 /**
3437 * Apply the plugin
3438 */
3439 apply(compiler: Compiler): void;
3440}
3441declare class EvalSourceMapDevToolPlugin {
3442 constructor(inputOptions: string | SourceMapDevToolPluginOptions);
3443 sourceMapComment: string;
3444 moduleFilenameTemplate: string | Function;
3445 namespace: string;
3446 options: SourceMapDevToolPluginOptions;
3447
3448 /**
3449 * Apply the plugin
3450 */
3451 apply(compiler: Compiler): void;
3452}
3453declare interface ExecuteModuleArgument {
3454 module: Module;
3455 moduleObject?: { id: string; exports: any; loaded: boolean };
3456 preparedInfo: any;
3457 codeGenerationResult: CodeGenerationResult;
3458}
3459declare interface ExecuteModuleContext {
3460 assets: Map<string, { source: Source; info: AssetInfo }>;
3461 chunk: Chunk;
3462 chunkGraph: ChunkGraph;
3463 __webpack_require__?: (arg0: string) => any;
3464}
3465declare interface ExecuteModuleOptions {
3466 entryOptions?: EntryOptions;
3467}
3468declare interface ExecuteModuleResult {
3469 exports: any;
3470 cacheable: boolean;
3471 assets: Map<string, { source: Source; info: AssetInfo }>;
3472 fileDependencies: LazySet<string>;
3473 contextDependencies: LazySet<string>;
3474 missingDependencies: LazySet<string>;
3475 buildDependencies: LazySet<string>;
3476}
3477type Experiments = ExperimentsCommon & ExperimentsExtra;
3478
3479/**
3480 * Enables/Disables experiments (experimental features with relax SemVer compatibility).
3481 */
3482declare interface ExperimentsCommon {
3483 /**
3484 * Support WebAssembly as asynchronous EcmaScript Module.
3485 */
3486 asyncWebAssembly?: boolean;
3487
3488 /**
3489 * Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.
3490 */
3491 backCompat?: boolean;
3492
3493 /**
3494 * Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.
3495 */
3496 cacheUnaffected?: boolean;
3497
3498 /**
3499 * Apply defaults of next major version.
3500 */
3501 futureDefaults?: boolean;
3502
3503 /**
3504 * Enable module layers.
3505 */
3506 layers?: boolean;
3507
3508 /**
3509 * Allow output javascript files as module source type.
3510 */
3511 outputModule?: boolean;
3512
3513 /**
3514 * Support WebAssembly as synchronous EcmaScript Module (outdated).
3515 */
3516 syncWebAssembly?: boolean;
3517
3518 /**
3519 * Allow using top-level-await in EcmaScript Modules.
3520 */
3521 topLevelAwait?: boolean;
3522}
3523
3524/**
3525 * Enables/Disables experiments (experimental features with relax SemVer compatibility).
3526 */
3527declare interface ExperimentsExtra {
3528 /**
3529 * Build http(s): urls using a lockfile and resource content cache.
3530 */
3531 buildHttp?: HttpUriOptions | (string | RegExp | ((uri: string) => boolean))[];
3532
3533 /**
3534 * Enable css support.
3535 */
3536 css?: boolean | CssExperimentOptions;
3537
3538 /**
3539 * Compile entrypoints and import()s only when they are accessed.
3540 */
3541 lazyCompilation?: boolean | LazyCompilationOptions;
3542}
3543type ExperimentsNormalized = ExperimentsCommon & ExperimentsNormalizedExtra;
3544
3545/**
3546 * Enables/Disables experiments (experimental features with relax SemVer compatibility).
3547 */
3548declare interface ExperimentsNormalizedExtra {
3549 /**
3550 * Build http(s): urls using a lockfile and resource content cache.
3551 */
3552 buildHttp?: HttpUriOptions;
3553
3554 /**
3555 * Enable css support.
3556 */
3557 css?: false | CssExperimentOptions;
3558
3559 /**
3560 * Compile entrypoints and import()s only when they are accessed.
3561 */
3562 lazyCompilation?: false | LazyCompilationOptions;
3563}
3564declare abstract class ExportInfo {
3565 name: string;
3566
3567 /**
3568 * true: it is provided
3569 * false: it is not provided
3570 * null: only the runtime knows if it is provided
3571 * undefined: it was not determined if it is provided
3572 */
3573 provided?: null | boolean;
3574
3575 /**
3576 * is the export a terminal binding that should be checked for export star conflicts
3577 */
3578 terminalBinding: boolean;
3579
3580 /**
3581 * true: it can be mangled
3582 * false: is can not be mangled
3583 * undefined: it was not determined if it can be mangled
3584 */
3585 canMangleProvide?: boolean;
3586
3587 /**
3588 * true: it can be mangled
3589 * false: is can not be mangled
3590 * undefined: it was not determined if it can be mangled
3591 */
3592 canMangleUse?: boolean;
3593 exportsInfoOwned: boolean;
3594 exportsInfo?: ExportsInfo;
3595 get canMangle(): boolean;
3596 setUsedInUnknownWay(runtime: RuntimeSpec): boolean;
3597 setUsedWithoutInfo(runtime: RuntimeSpec): boolean;
3598 setHasUseInfo(): void;
3599 setUsedConditionally(
3600 condition: (arg0: UsageStateType) => boolean,
3601 newValue: UsageStateType,
3602 runtime: RuntimeSpec
3603 ): boolean;
3604 setUsed(newValue: UsageStateType, runtime: RuntimeSpec): boolean;
3605 unsetTarget(key?: any): boolean;
3606 setTarget(
3607 key: any,
3608 connection: ModuleGraphConnection,
3609 exportName?: string[],
3610 priority?: number
3611 ): boolean;
3612 getUsed(runtime: RuntimeSpec): UsageStateType;
3613
3614 /**
3615 * get used name
3616 */
3617 getUsedName(
3618 fallbackName: undefined | string,
3619 runtime: RuntimeSpec
3620 ): string | false;
3621 hasUsedName(): boolean;
3622
3623 /**
3624 * Sets the mangled name of this export
3625 */
3626 setUsedName(name: string): void;
3627 getTerminalBinding(
3628 moduleGraph: ModuleGraph,
3629 resolveTargetFilter?: (arg0: {
3630 module: Module;
3631 export?: string[];
3632 }) => boolean
3633 ): undefined | ExportsInfo | ExportInfo;
3634 isReexport(): undefined | boolean;
3635 findTarget(
3636 moduleGraph: ModuleGraph,
3637 validTargetModuleFilter: (arg0: Module) => boolean
3638 ): undefined | false | { module: Module; export?: string[] };
3639 getTarget(
3640 moduleGraph: ModuleGraph,
3641 resolveTargetFilter?: (arg0: {
3642 module: Module;
3643 export?: string[];
3644 }) => boolean
3645 ): undefined | { module: Module; export?: string[] };
3646
3647 /**
3648 * Move the target forward as long resolveTargetFilter is fulfilled
3649 */
3650 moveTarget(
3651 moduleGraph: ModuleGraph,
3652 resolveTargetFilter: (arg0: {
3653 module: Module;
3654 export?: string[];
3655 }) => boolean,
3656 updateOriginalConnection?: (arg0: {
3657 module: Module;
3658 export?: string[];
3659 }) => ModuleGraphConnection
3660 ): undefined | { module: Module; export?: string[] };
3661 createNestedExportsInfo(): undefined | ExportsInfo;
3662 getNestedExportsInfo(): undefined | ExportsInfo;
3663 hasInfo(baseInfo?: any, runtime?: any): boolean;
3664 updateHash(hash?: any, runtime?: any): void;
3665 getUsedInfo(): string;
3666 getProvidedInfo():
3667 | "no provided info"
3668 | "maybe provided (runtime-defined)"
3669 | "provided"
3670 | "not provided";
3671 getRenameInfo(): string;
3672}
3673declare interface ExportSpec {
3674 /**
3675 * the name of the export
3676 */
3677 name: string;
3678
3679 /**
3680 * can the export be renamed (defaults to true)
3681 */
3682 canMangle?: boolean;
3683
3684 /**
3685 * is the export a terminal binding that should be checked for export star conflicts
3686 */
3687 terminalBinding?: boolean;
3688
3689 /**
3690 * nested exports
3691 */
3692 exports?: (string | ExportSpec)[];
3693
3694 /**
3695 * when reexported: from which module
3696 */
3697 from?: ModuleGraphConnection;
3698
3699 /**
3700 * when reexported: from which export
3701 */
3702 export?: null | string[];
3703
3704 /**
3705 * when reexported: with which priority
3706 */
3707 priority?: number;
3708
3709 /**
3710 * export is not visible, because another export blends over it
3711 */
3712 hidden?: boolean;
3713}
3714type ExportedVariableInfo = string | ScopeInfo | VariableInfo;
3715declare abstract class ExportsInfo {
3716 get ownedExports(): Iterable<ExportInfo>;
3717 get orderedOwnedExports(): Iterable<ExportInfo>;
3718 get exports(): Iterable<ExportInfo>;
3719 get orderedExports(): Iterable<ExportInfo>;
3720 get otherExportsInfo(): ExportInfo;
3721 setRedirectNamedTo(exportsInfo?: any): boolean;
3722 setHasProvideInfo(): void;
3723 setHasUseInfo(): void;
3724 getOwnExportInfo(name: string): ExportInfo;
3725 getExportInfo(name: string): ExportInfo;
3726 getReadOnlyExportInfo(name: string): ExportInfo;
3727 getReadOnlyExportInfoRecursive(name: string[]): undefined | ExportInfo;
3728 getNestedExportsInfo(name?: string[]): undefined | ExportsInfo;
3729 setUnknownExportsProvided(
3730 canMangle?: boolean,
3731 excludeExports?: Set<string>,
3732 targetKey?: any,
3733 targetModule?: ModuleGraphConnection,
3734 priority?: number
3735 ): boolean;
3736 setUsedInUnknownWay(runtime: RuntimeSpec): boolean;
3737 setUsedWithoutInfo(runtime: RuntimeSpec): boolean;
3738 setAllKnownExportsUsed(runtime: RuntimeSpec): boolean;
3739 setUsedForSideEffectsOnly(runtime: RuntimeSpec): boolean;
3740 isUsed(runtime: RuntimeSpec): boolean;
3741 isModuleUsed(runtime: RuntimeSpec): boolean;
3742 getUsedExports(runtime: RuntimeSpec): null | boolean | SortableSet<string>;
3743 getProvidedExports(): null | true | string[];
3744 getRelevantExports(runtime: RuntimeSpec): ExportInfo[];
3745 isExportProvided(name: string | string[]): undefined | null | boolean;
3746 getUsageKey(runtime: RuntimeSpec): string;
3747 isEquallyUsed(runtimeA: RuntimeSpec, runtimeB: RuntimeSpec): boolean;
3748 getUsed(name: string | string[], runtime: RuntimeSpec): UsageStateType;
3749 getUsedName(
3750 name: string | string[],
3751 runtime: RuntimeSpec
3752 ): string | false | string[];
3753 updateHash(hash: Hash, runtime: RuntimeSpec): void;
3754 getRestoreProvidedData(): any;
3755 restoreProvided(__0: {
3756 otherProvided: any;
3757 otherCanMangleProvide: any;
3758 otherTerminalBinding: any;
3759 exports: any;
3760 }): void;
3761}
3762declare interface ExportsSpec {
3763 /**
3764 * exported names, true for unknown exports or null for no exports
3765 */
3766 exports: null | true | (string | ExportSpec)[];
3767
3768 /**
3769 * when exports = true, list of unaffected exports
3770 */
3771 excludeExports?: Set<string>;
3772
3773 /**
3774 * list of maybe prior exposed, but now hidden exports
3775 */
3776 hideExports?: Set<string>;
3777
3778 /**
3779 * when reexported: from which module
3780 */
3781 from?: ModuleGraphConnection;
3782
3783 /**
3784 * when reexported: with which priority
3785 */
3786 priority?: number;
3787
3788 /**
3789 * can the export be renamed (defaults to true)
3790 */
3791 canMangle?: boolean;
3792
3793 /**
3794 * are the exports terminal bindings that should be checked for export star conflicts
3795 */
3796 terminalBinding?: boolean;
3797
3798 /**
3799 * module on which the result depends on
3800 */
3801 dependencies?: Module[];
3802}
3803type Exposes = (string | ExposesObject)[] | ExposesObject;
3804
3805/**
3806 * Advanced configuration for modules that should be exposed by this container.
3807 */
3808declare interface ExposesConfig {
3809 /**
3810 * Request to a module that should be exposed by this container.
3811 */
3812 import: string | string[];
3813
3814 /**
3815 * Custom chunk name for the exposed module.
3816 */
3817 name?: string;
3818}
3819
3820/**
3821 * Modules that should be exposed by this container. Property names are used as public paths.
3822 */
3823declare interface ExposesObject {
3824 [index: string]: string | ExposesConfig | string[];
3825}
3826type Expression =
3827 | UnaryExpression
3828 | ThisExpression
3829 | ArrayExpression
3830 | ObjectExpression
3831 | FunctionExpression
3832 | ArrowFunctionExpression
3833 | YieldExpression
3834 | SimpleLiteral
3835 | RegExpLiteral
3836 | BigIntLiteral
3837 | UpdateExpression
3838 | BinaryExpression
3839 | AssignmentExpression
3840 | LogicalExpression
3841 | MemberExpression
3842 | ConditionalExpression
3843 | SimpleCallExpression
3844 | NewExpression
3845 | SequenceExpression
3846 | TemplateLiteral
3847 | TaggedTemplateExpression
3848 | ClassExpression
3849 | MetaProperty
3850 | Identifier
3851 | AwaitExpression
3852 | ImportExpression
3853 | ChainExpression;
3854declare interface ExpressionExpressionInfo {
3855 type: "expression";
3856 rootInfo: string | VariableInfo;
3857 name: string;
3858 getMembers: () => string[];
3859 getMembersOptionals: () => boolean[];
3860}
3861declare interface ExtensionAliasOption {
3862 alias: string | string[];
3863 extension: string;
3864}
3865declare interface ExtensionAliasOptions {
3866 [index: string]: string | string[];
3867}
3868type ExternalItem =
3869 | string
3870 | RegExp
3871 | (ExternalItemObjectKnown & ExternalItemObjectUnknown)
3872 | ((
3873 data: ExternalItemFunctionData,
3874 callback: (
3875 err?: Error,
3876 result?: string | boolean | string[] | { [index: string]: any }
3877 ) => void
3878 ) => void)
3879 | ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
3880
3881/**
3882 * Data object passed as argument when a function is set for 'externals'.
3883 */
3884declare interface ExternalItemFunctionData {
3885 /**
3886 * The directory in which the request is placed.
3887 */
3888 context?: string;
3889
3890 /**
3891 * Contextual information.
3892 */
3893 contextInfo?: ModuleFactoryCreateDataContextInfo;
3894
3895 /**
3896 * The category of the referencing dependencies.
3897 */
3898 dependencyType?: string;
3899
3900 /**
3901 * Get a resolve function with the current resolver options.
3902 */
3903 getResolve?: (
3904 options?: ResolveOptionsWebpackOptions
3905 ) =>
3906 | ((
3907 context: string,
3908 request: string,
3909 callback: (err?: Error, result?: string) => void
3910 ) => void)
3911 | ((context: string, request: string) => Promise<string>);
3912
3913 /**
3914 * The request as written by the user in the require/import expression/statement.
3915 */
3916 request?: string;
3917}
3918
3919/**
3920 * If an dependency matches exactly a property of the object, the property value is used as dependency.
3921 */
3922declare interface ExternalItemObjectKnown {
3923 /**
3924 * Specify externals depending on the layer.
3925 */
3926 byLayer?:
3927 | { [index: string]: ExternalItem }
3928 | ((layer: null | string) => ExternalItem);
3929}
3930
3931/**
3932 * If an dependency matches exactly a property of the object, the property value is used as dependency.
3933 */
3934declare interface ExternalItemObjectUnknown {
3935 [index: string]: ExternalItemValue;
3936}
3937type ExternalItemValue = string | boolean | string[] | { [index: string]: any };
3938declare class ExternalModule extends Module {
3939 constructor(request?: any, type?: any, userRequest?: any);
3940 request: string | string[] | Record<string, string | string[]>;
3941 externalType: string;
3942 userRequest: string;
3943 restoreFromUnsafeCache(
3944 unsafeCacheData?: any,
3945 normalModuleFactory?: any
3946 ): void;
3947}
3948declare interface ExternalModuleInfo {
3949 index: number;
3950 module: Module;
3951}
3952type Externals =
3953 | string
3954 | RegExp
3955 | ExternalItem[]
3956 | (ExternalItemObjectKnown & ExternalItemObjectUnknown)
3957 | ((
3958 data: ExternalItemFunctionData,
3959 callback: (
3960 err?: Error,
3961 result?: string | boolean | string[] | { [index: string]: any }
3962 ) => void
3963 ) => void)
3964 | ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
3965declare class ExternalsPlugin {
3966 constructor(type: undefined | string, externals: Externals);
3967 type?: string;
3968 externals: Externals;
3969
3970 /**
3971 * Apply the plugin
3972 */
3973 apply(compiler: Compiler): void;
3974}
3975
3976/**
3977 * Enable presets of externals for specific targets.
3978 */
3979declare interface ExternalsPresets {
3980 /**
3981 * 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.
3982 */
3983 electron?: boolean;
3984
3985 /**
3986 * Treat electron built-in modules in the main context like 'app', 'ipc-main' or 'shell' as external and load them via require() when used.
3987 */
3988 electronMain?: boolean;
3989
3990 /**
3991 * 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.
3992 */
3993 electronPreload?: boolean;
3994
3995 /**
3996 * 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.
3997 */
3998 electronRenderer?: boolean;
3999
4000 /**
4001 * Treat node.js built-in modules like fs, path or vm as external and load them via require() when used.
4002 */
4003 node?: boolean;
4004
4005 /**
4006 * Treat NW.js legacy nw.gui module as external and load it via require() when used.
4007 */
4008 nwjs?: boolean;
4009
4010 /**
4011 * 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).
4012 */
4013 web?: boolean;
4014
4015 /**
4016 * 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).
4017 */
4018 webAsync?: boolean;
4019}
4020type ExternalsType =
4021 | "import"
4022 | "var"
4023 | "module"
4024 | "assign"
4025 | "this"
4026 | "window"
4027 | "self"
4028 | "global"
4029 | "commonjs"
4030 | "commonjs2"
4031 | "commonjs-module"
4032 | "commonjs-static"
4033 | "amd"
4034 | "amd-require"
4035 | "umd"
4036 | "umd2"
4037 | "jsonp"
4038 | "system"
4039 | "promise"
4040 | "script"
4041 | "node-commonjs";
4042declare interface FactorizeModuleOptions {
4043 currentProfile: ModuleProfile;
4044 factory: ModuleFactory;
4045 dependencies: Dependency[];
4046
4047 /**
4048 * return full ModuleFactoryResult instead of only module
4049 */
4050 factoryResult?: boolean;
4051 originModule: null | Module;
4052 contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>;
4053 context?: string;
4054}
4055type FakeHook<T> = T & FakeHookMarker;
4056declare interface FakeHookMarker {}
4057declare interface FallbackCacheGroup {
4058 chunksFilter: (chunk: Chunk) => boolean;
4059 minSize: SplitChunksSizes;
4060 maxAsyncSize: SplitChunksSizes;
4061 maxInitialSize: SplitChunksSizes;
4062 automaticNameDelimiter: string;
4063}
4064declare class FetchCompileAsyncWasmPlugin {
4065 constructor();
4066
4067 /**
4068 * Apply the plugin
4069 */
4070 apply(compiler: Compiler): void;
4071}
4072declare class FetchCompileWasmPlugin {
4073 constructor(options?: any);
4074 options: any;
4075
4076 /**
4077 * Apply the plugin
4078 */
4079 apply(compiler: Compiler): void;
4080}
4081
4082/**
4083 * Options object for persistent file-based caching.
4084 */
4085declare interface FileCacheOptions {
4086 /**
4087 * Allows to collect unused memory allocated during deserialization. This requires copying data into smaller buffers and has a performance cost.
4088 */
4089 allowCollectingMemory?: boolean;
4090
4091 /**
4092 * Dependencies the build depends on (in multiple categories, default categories: 'defaultWebpack').
4093 */
4094 buildDependencies?: { [index: string]: string[] };
4095
4096 /**
4097 * Base directory for the cache (defaults to node_modules/.cache/webpack).
4098 */
4099 cacheDirectory?: string;
4100
4101 /**
4102 * Locations for the cache (defaults to cacheDirectory / name).
4103 */
4104 cacheLocation?: string;
4105
4106 /**
4107 * Compression type used for the cache files.
4108 */
4109 compression?: false | "gzip" | "brotli";
4110
4111 /**
4112 * Algorithm used for generation the hash (see node.js crypto package).
4113 */
4114 hashAlgorithm?: string;
4115
4116 /**
4117 * Time in ms after which idle period the cache storing should happen.
4118 */
4119 idleTimeout?: number;
4120
4121 /**
4122 * 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).
4123 */
4124 idleTimeoutAfterLargeChanges?: number;
4125
4126 /**
4127 * Time in ms after which idle period the initial cache storing should happen.
4128 */
4129 idleTimeoutForInitialStore?: number;
4130
4131 /**
4132 * List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.
4133 */
4134 immutablePaths?: (string | RegExp)[];
4135
4136 /**
4137 * List of paths that are managed by a package manager and can be trusted to not be modified otherwise.
4138 */
4139 managedPaths?: (string | RegExp)[];
4140
4141 /**
4142 * Time for which unused cache entries stay in the filesystem cache at minimum (in milliseconds).
4143 */
4144 maxAge?: number;
4145
4146 /**
4147 * 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.
4148 */
4149 maxMemoryGenerations?: number;
4150
4151 /**
4152 * Additionally cache computation of modules that are unchanged and reference only unchanged modules in memory.
4153 */
4154 memoryCacheUnaffected?: boolean;
4155
4156 /**
4157 * Name for the cache. Different names will lead to different coexisting caches.
4158 */
4159 name?: string;
4160
4161 /**
4162 * Track and log detailed timing information for individual cache items.
4163 */
4164 profile?: boolean;
4165
4166 /**
4167 * When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).
4168 */
4169 store?: "pack";
4170
4171 /**
4172 * Filesystem caching.
4173 */
4174 type: "filesystem";
4175
4176 /**
4177 * 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.
4178 */
4179 version?: string;
4180}
4181declare interface FileSystem {
4182 readFile: {
4183 (arg0: string, arg1: FileSystemCallback<string | Buffer>): void;
4184 (
4185 arg0: string,
4186 arg1: object,
4187 arg2: FileSystemCallback<string | Buffer>
4188 ): void;
4189 };
4190 readdir: {
4191 (
4192 arg0: string,
4193 arg1: FileSystemCallback<(string | Buffer)[] | FileSystemDirent[]>
4194 ): void;
4195 (
4196 arg0: string,
4197 arg1: object,
4198 arg2: FileSystemCallback<(string | Buffer)[] | FileSystemDirent[]>
4199 ): void;
4200 };
4201 readJson?: {
4202 (arg0: string, arg1: FileSystemCallback<object>): void;
4203 (arg0: string, arg1: object, arg2: FileSystemCallback<object>): void;
4204 };
4205 readlink: {
4206 (arg0: string, arg1: FileSystemCallback<string | Buffer>): void;
4207 (
4208 arg0: string,
4209 arg1: object,
4210 arg2: FileSystemCallback<string | Buffer>
4211 ): void;
4212 };
4213 lstat?: {
4214 (arg0: string, arg1: FileSystemCallback<FileSystemStats>): void;
4215 (
4216 arg0: string,
4217 arg1: object,
4218 arg2: FileSystemCallback<string | Buffer>
4219 ): void;
4220 };
4221 stat: {
4222 (arg0: string, arg1: FileSystemCallback<FileSystemStats>): void;
4223 (
4224 arg0: string,
4225 arg1: object,
4226 arg2: FileSystemCallback<string | Buffer>
4227 ): void;
4228 };
4229}
4230declare interface FileSystemCallback<T> {
4231 (err?: null | (PossibleFileSystemError & Error), result?: T): any;
4232}
4233declare interface FileSystemDirent {
4234 name: string | Buffer;
4235 isDirectory: () => boolean;
4236 isFile: () => boolean;
4237}
4238declare abstract class FileSystemInfo {
4239 fs: InputFileSystem;
4240 logger?: WebpackLogger;
4241 fileTimestampQueue: AsyncQueue<string, string, null | FileSystemInfoEntry>;
4242 fileHashQueue: AsyncQueue<string, string, null | string>;
4243 contextTimestampQueue: AsyncQueue<
4244 string,
4245 string,
4246 null | ContextFileSystemInfoEntry
4247 >;
4248 contextHashQueue: AsyncQueue<string, string, null | ContextHash>;
4249 contextTshQueue: AsyncQueue<string, string, null | ContextTimestampAndHash>;
4250 managedItemQueue: AsyncQueue<string, string, null | string>;
4251 managedItemDirectoryQueue: AsyncQueue<string, string, Set<string>>;
4252 managedPaths: (string | RegExp)[];
4253 managedPathsWithSlash: string[];
4254 managedPathsRegExps: RegExp[];
4255 immutablePaths: (string | RegExp)[];
4256 immutablePathsWithSlash: string[];
4257 immutablePathsRegExps: RegExp[];
4258 logStatistics(): void;
4259 clear(): void;
4260 addFileTimestamps(
4261 map: ReadonlyMap<string, null | FileSystemInfoEntry | "ignore">,
4262 immutable?: boolean
4263 ): void;
4264 addContextTimestamps(
4265 map: ReadonlyMap<string, null | FileSystemInfoEntry | "ignore">,
4266 immutable?: boolean
4267 ): void;
4268 getFileTimestamp(
4269 path: string,
4270 callback: (
4271 arg0?: null | WebpackError,
4272 arg1?: null | FileSystemInfoEntry | "ignore"
4273 ) => void
4274 ): void;
4275 getContextTimestamp(
4276 path: string,
4277 callback: (
4278 arg0?: null | WebpackError,
4279 arg1?: null | "ignore" | ResolvedContextFileSystemInfoEntry
4280 ) => void
4281 ): void;
4282 getFileHash(
4283 path: string,
4284 callback: (arg0?: null | WebpackError, arg1?: string) => void
4285 ): void;
4286 getContextHash(
4287 path: string,
4288 callback: (arg0?: null | WebpackError, arg1?: string) => void
4289 ): void;
4290 getContextTsh(
4291 path: string,
4292 callback: (
4293 arg0?: null | WebpackError,
4294 arg1?: ResolvedContextTimestampAndHash
4295 ) => void
4296 ): void;
4297 resolveBuildDependencies(
4298 context: string,
4299 deps: Iterable<string>,
4300 callback: (
4301 arg0?: null | Error,
4302 arg1?: ResolveBuildDependenciesResult
4303 ) => void
4304 ): void;
4305 checkResolveResultsValid(
4306 resolveResults: Map<string, string | false>,
4307 callback: (arg0?: null | Error, arg1?: boolean) => void
4308 ): void;
4309 createSnapshot(
4310 startTime: number,
4311 files: Iterable<string>,
4312 directories: Iterable<string>,
4313 missing: Iterable<string>,
4314 options: {
4315 /**
4316 * Use hashes of the content of the files/directories to determine invalidation.
4317 */
4318 hash?: boolean;
4319 /**
4320 * Use timestamps of the files/directories to determine invalidation.
4321 */
4322 timestamp?: boolean;
4323 },
4324 callback: (arg0?: null | WebpackError, arg1?: null | Snapshot) => void
4325 ): void;
4326 mergeSnapshots(snapshot1: Snapshot, snapshot2: Snapshot): Snapshot;
4327 checkSnapshotValid(
4328 snapshot: Snapshot,
4329 callback: (arg0?: null | WebpackError, arg1?: boolean) => void
4330 ): void;
4331 getDeprecatedFileTimestamps(): Map<any, any>;
4332 getDeprecatedContextTimestamps(): Map<any, any>;
4333}
4334declare interface FileSystemInfoEntry {
4335 safeTime: number;
4336 timestamp?: number;
4337}
4338declare interface FileSystemStats {
4339 isDirectory: () => boolean;
4340 isFile: () => boolean;
4341}
4342type FilterItemTypes = string | RegExp | ((value: string) => boolean);
4343declare interface GenerateContext {
4344 /**
4345 * mapping from dependencies to templates
4346 */
4347 dependencyTemplates: DependencyTemplates;
4348
4349 /**
4350 * the runtime template
4351 */
4352 runtimeTemplate: RuntimeTemplate;
4353
4354 /**
4355 * the module graph
4356 */
4357 moduleGraph: ModuleGraph;
4358
4359 /**
4360 * the chunk graph
4361 */
4362 chunkGraph: ChunkGraph;
4363
4364 /**
4365 * the requirements for runtime
4366 */
4367 runtimeRequirements: Set<string>;
4368
4369 /**
4370 * the runtime
4371 */
4372 runtime: RuntimeSpec;
4373
4374 /**
4375 * when in concatenated module, information about other concatenated modules
4376 */
4377 concatenationScope?: ConcatenationScope;
4378
4379 /**
4380 * code generation results of other modules (need to have a codeGenerationDependency to use that)
4381 */
4382 codeGenerationResults?: CodeGenerationResults;
4383
4384 /**
4385 * which kind of code should be generated
4386 */
4387 type: string;
4388
4389 /**
4390 * get access to the code generation data
4391 */
4392 getData?: () => Map<string, any>;
4393}
4394declare class Generator {
4395 constructor();
4396 getTypes(module: NormalModule): Set<string>;
4397 getSize(module: NormalModule, type?: string): number;
4398 generate(module: NormalModule, __1: GenerateContext): Source;
4399 getConcatenationBailoutReason(
4400 module: NormalModule,
4401 context: ConcatenationBailoutReasonContext
4402 ): undefined | string;
4403 updateHash(hash: Hash, __1: UpdateHashContextGenerator): void;
4404 static byType(map?: any): ByTypeGenerator;
4405}
4406type GeneratorOptionsByModuleType = GeneratorOptionsByModuleTypeKnown &
4407 GeneratorOptionsByModuleTypeUnknown;
4408
4409/**
4410 * Specify options for each generator.
4411 */
4412declare interface GeneratorOptionsByModuleTypeKnown {
4413 /**
4414 * Generator options for asset modules.
4415 */
4416 asset?: AssetGeneratorOptions;
4417
4418 /**
4419 * Generator options for asset/inline modules.
4420 */
4421 "asset/inline"?: AssetInlineGeneratorOptions;
4422
4423 /**
4424 * Generator options for asset/resource modules.
4425 */
4426 "asset/resource"?: AssetResourceGeneratorOptions;
4427
4428 /**
4429 * No generator options are supported for this module type.
4430 */
4431 javascript?: EmptyGeneratorOptions;
4432
4433 /**
4434 * No generator options are supported for this module type.
4435 */
4436 "javascript/auto"?: EmptyGeneratorOptions;
4437
4438 /**
4439 * No generator options are supported for this module type.
4440 */
4441 "javascript/dynamic"?: EmptyGeneratorOptions;
4442
4443 /**
4444 * No generator options are supported for this module type.
4445 */
4446 "javascript/esm"?: EmptyGeneratorOptions;
4447}
4448
4449/**
4450 * Specify options for each generator.
4451 */
4452declare interface GeneratorOptionsByModuleTypeUnknown {
4453 [index: string]: { [index: string]: any };
4454}
4455declare class GetChunkFilenameRuntimeModule extends RuntimeModule {
4456 constructor(
4457 contentType: string,
4458 name: string,
4459 global: string,
4460 getFilenameForChunk: (
4461 arg0: Chunk
4462 ) => string | ((arg0: PathData, arg1?: AssetInfo) => string),
4463 allChunks: boolean
4464 );
4465 contentType: string;
4466 global: string;
4467 getFilenameForChunk: (
4468 arg0: Chunk
4469 ) => string | ((arg0: PathData, arg1?: AssetInfo) => string);
4470 allChunks: boolean;
4471
4472 /**
4473 * Runtime modules without any dependencies to other runtime modules
4474 */
4475 static STAGE_NORMAL: number;
4476
4477 /**
4478 * Runtime modules with simple dependencies on other runtime modules
4479 */
4480 static STAGE_BASIC: number;
4481
4482 /**
4483 * Runtime modules which attach to handlers of other runtime modules
4484 */
4485 static STAGE_ATTACH: number;
4486
4487 /**
4488 * Runtime modules which trigger actions on bootstrap
4489 */
4490 static STAGE_TRIGGER: number;
4491}
4492declare interface GroupConfig {
4493 getKeys: (arg0?: any) => string[];
4494 createGroup: (arg0: string, arg1: any[], arg2: any[]) => object;
4495 getOptions?: (arg0: string, arg1: any[]) => GroupOptions;
4496}
4497declare interface GroupOptions {
4498 groupChildren?: boolean;
4499 force?: boolean;
4500 targetGroupCount?: number;
4501}
4502declare interface HMRJavascriptParserHooks {
4503 hotAcceptCallback: SyncBailHook<[any, string[]], void>;
4504 hotAcceptWithoutCallback: SyncBailHook<[any, string[]], void>;
4505}
4506declare interface HandleModuleCreationOptions {
4507 factory: ModuleFactory;
4508 dependencies: Dependency[];
4509 originModule: null | Module;
4510 contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>;
4511 context?: string;
4512
4513 /**
4514 * recurse into dependencies of the created module
4515 */
4516 recursive?: boolean;
4517
4518 /**
4519 * connect the resolved module with the origin module
4520 */
4521 connectOrigin?: boolean;
4522}
4523declare class HarmonyImportDependency extends ModuleDependency {
4524 constructor(
4525 request: string,
4526 sourceOrder: number,
4527 assertions?: Record<string, any>
4528 );
4529 sourceOrder: number;
4530 getImportVar(moduleGraph: ModuleGraph): string;
4531 getImportStatement(
4532 update: boolean,
4533 __1: DependencyTemplateContext
4534 ): [string, string];
4535 getLinkingErrors(
4536 moduleGraph: ModuleGraph,
4537 ids: string[],
4538 additionalMessage: string
4539 ): undefined | WebpackError[];
4540 static Template: typeof HarmonyImportDependencyTemplate;
4541 static ExportPresenceModes: {
4542 NONE: 0;
4543 WARN: 1;
4544 AUTO: 2;
4545 ERROR: 3;
4546 fromUserOption(str?: any): 0 | 1 | 2 | 3;
4547 };
4548 static NO_EXPORTS_REFERENCED: string[][];
4549 static EXPORTS_OBJECT_REFERENCED: string[][];
4550 static TRANSITIVE: typeof TRANSITIVE;
4551}
4552declare class HarmonyImportDependencyTemplate extends DependencyTemplate {
4553 constructor();
4554 static getImportEmittedRuntime(
4555 module: Module,
4556 referencedModule: Module
4557 ): undefined | string | boolean | SortableSet<string>;
4558}
4559declare class Hash {
4560 constructor();
4561
4562 /**
4563 * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
4564 */
4565 update(data: string | Buffer, inputEncoding?: string): Hash;
4566
4567 /**
4568 * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
4569 */
4570 digest(encoding?: string): string | Buffer;
4571}
4572declare interface HashableObject {
4573 updateHash: (arg0: Hash) => void;
4574}
4575declare class HashedModuleIdsPlugin {
4576 constructor(options?: HashedModuleIdsPluginOptions);
4577 options: HashedModuleIdsPluginOptions;
4578 apply(compiler?: any): void;
4579}
4580declare interface HashedModuleIdsPluginOptions {
4581 /**
4582 * The context directory for creating names.
4583 */
4584 context?: string;
4585
4586 /**
4587 * The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.
4588 */
4589 hashDigest?: "latin1" | "hex" | "base64";
4590
4591 /**
4592 * The prefix length of the hash digest to use, defaults to 4.
4593 */
4594 hashDigestLength?: number;
4595
4596 /**
4597 * The hashing algorithm to use, defaults to 'md4'. All functions from Node.JS' crypto.createHash are supported.
4598 */
4599 hashFunction?: string | typeof Hash;
4600}
4601declare abstract class HelperRuntimeModule extends RuntimeModule {}
4602declare class HotModuleReplacementPlugin {
4603 constructor(options?: any);
4604 options: any;
4605
4606 /**
4607 * Apply the plugin
4608 */
4609 apply(compiler: Compiler): void;
4610 static getParserHooks(parser: JavascriptParser): HMRJavascriptParserHooks;
4611}
4612
4613/**
4614 * These properties are added by the HotModuleReplacementPlugin
4615 */
4616declare interface HotModuleReplacementPluginLoaderContext {
4617 hot?: boolean;
4618}
4619declare class HotUpdateChunk extends Chunk {
4620 constructor();
4621}
4622
4623/**
4624 * Options for building http resources.
4625 */
4626declare interface HttpUriOptions {
4627 /**
4628 * List of allowed URIs (resp. the beginning of them).
4629 */
4630 allowedUris: (string | RegExp | ((uri: string) => boolean))[];
4631
4632 /**
4633 * Location where resource content is stored for lockfile entries. It's also possible to disable storing by passing false.
4634 */
4635 cacheLocation?: string | false;
4636
4637 /**
4638 * When set, anything that would lead to a modification of the lockfile or any resource content, will result in an error.
4639 */
4640 frozen?: boolean;
4641
4642 /**
4643 * Location of the lockfile.
4644 */
4645 lockfileLocation?: string;
4646
4647 /**
4648 * Proxy configuration, which can be used to specify a proxy server to use for HTTP requests.
4649 */
4650 proxy?: string;
4651
4652 /**
4653 * When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.
4654 */
4655 upgrade?: boolean;
4656}
4657declare class HttpUriPlugin {
4658 constructor(options: HttpUriOptions);
4659
4660 /**
4661 * Apply the plugin
4662 */
4663 apply(compiler: Compiler): void;
4664}
4665declare interface IDirent {
4666 isFile: () => boolean;
4667 isDirectory: () => boolean;
4668 isBlockDevice: () => boolean;
4669 isCharacterDevice: () => boolean;
4670 isSymbolicLink: () => boolean;
4671 isFIFO: () => boolean;
4672 isSocket: () => boolean;
4673 name: string | Buffer;
4674}
4675declare interface IStats {
4676 isFile: () => boolean;
4677 isDirectory: () => boolean;
4678 isBlockDevice: () => boolean;
4679 isCharacterDevice: () => boolean;
4680 isSymbolicLink: () => boolean;
4681 isFIFO: () => boolean;
4682 isSocket: () => boolean;
4683 dev: number | bigint;
4684 ino: number | bigint;
4685 mode: number | bigint;
4686 nlink: number | bigint;
4687 uid: number | bigint;
4688 gid: number | bigint;
4689 rdev: number | bigint;
4690 size: number | bigint;
4691 blksize: number | bigint;
4692 blocks: number | bigint;
4693 atimeMs: number | bigint;
4694 mtimeMs: number | bigint;
4695 ctimeMs: number | bigint;
4696 birthtimeMs: number | bigint;
4697 atime: Date;
4698 mtime: Date;
4699 ctime: Date;
4700 birthtime: Date;
4701}
4702declare class IgnorePlugin {
4703 constructor(options: IgnorePluginOptions);
4704 options: IgnorePluginOptions;
4705
4706 /**
4707 * Note that if "contextRegExp" is given, both the "resourceRegExp"
4708 * and "contextRegExp" have to match.
4709 */
4710 checkIgnore(resolveData: ResolveData): undefined | false;
4711
4712 /**
4713 * Apply the plugin
4714 */
4715 apply(compiler: Compiler): void;
4716}
4717type IgnorePluginOptions =
4718 | {
4719 /**
4720 * A RegExp to test the context (directory) against.
4721 */
4722 contextRegExp?: RegExp;
4723 /**
4724 * A RegExp to test the request against.
4725 */
4726 resourceRegExp: RegExp;
4727 }
4728 | {
4729 /**
4730 * A filter function for resource and context.
4731 */
4732 checkResource: (resource: string, context: string) => boolean;
4733 };
4734declare interface ImportModuleOptions {
4735 /**
4736 * the target layer
4737 */
4738 layer?: string;
4739
4740 /**
4741 * the target public path
4742 */
4743 publicPath?: string;
4744
4745 /**
4746 * target base uri
4747 */
4748 baseUri?: string;
4749}
4750type ImportSource =
4751 | undefined
4752 | null
4753 | string
4754 | SimpleLiteral
4755 | RegExpLiteral
4756 | BigIntLiteral;
4757
4758/**
4759 * Options for infrastructure level logging.
4760 */
4761declare interface InfrastructureLogging {
4762 /**
4763 * 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.
4764 */
4765 appendOnly?: boolean;
4766
4767 /**
4768 * Enables/Disables colorful output. This option is only used when no custom console is provided.
4769 */
4770 colors?: boolean;
4771
4772 /**
4773 * Custom console used for logging.
4774 */
4775 console?: Console;
4776
4777 /**
4778 * Enable debug logging for specific loggers.
4779 */
4780 debug?:
4781 | string
4782 | boolean
4783 | RegExp
4784 | FilterItemTypes[]
4785 | ((value: string) => boolean);
4786
4787 /**
4788 * Log level.
4789 */
4790 level?: "none" | "error" | "warn" | "info" | "log" | "verbose";
4791
4792 /**
4793 * Stream used for logging output. Defaults to process.stderr. This option is only used when no custom console is provided.
4794 */
4795 stream?: NodeJS.WritableStream;
4796}
4797declare abstract class InitFragment<Context> {
4798 content: string | Source;
4799 stage: number;
4800 position: number;
4801 key?: string;
4802 endContent?: string | Source;
4803 getContent(context: Context): string | Source;
4804 getEndContent(context: Context): undefined | string | Source;
4805 serialize(context?: any): void;
4806 deserialize(context?: any): void;
4807 merge: any;
4808}
4809declare interface InputFileSystem {
4810 readFile: (
4811 arg0: string,
4812 arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
4813 ) => void;
4814 readJson?: (
4815 arg0: string,
4816 arg1: (arg0?: null | Error | NodeJS.ErrnoException, arg1?: any) => void
4817 ) => void;
4818 readlink: (
4819 arg0: string,
4820 arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
4821 ) => void;
4822 readdir: (
4823 arg0: string,
4824 arg1: (
4825 arg0?: null | NodeJS.ErrnoException,
4826 arg1?: (string | Buffer)[] | IDirent[]
4827 ) => void
4828 ) => void;
4829 stat: (
4830 arg0: string,
4831 arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
4832 ) => void;
4833 lstat?: (
4834 arg0: string,
4835 arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
4836 ) => void;
4837 realpath?: (
4838 arg0: string,
4839 arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
4840 ) => void;
4841 purge?: (arg0?: string) => void;
4842 join?: (arg0: string, arg1: string) => string;
4843 relative?: (arg0: string, arg1: string) => string;
4844 dirname?: (arg0: string) => string;
4845}
4846type IntermediateFileSystem = InputFileSystem &
4847 OutputFileSystem &
4848 IntermediateFileSystemExtras;
4849declare interface IntermediateFileSystemExtras {
4850 mkdirSync: (arg0: string) => void;
4851 createWriteStream: (arg0: string) => NodeJS.WritableStream;
4852 open: (
4853 arg0: string,
4854 arg1: string,
4855 arg2: (arg0?: null | NodeJS.ErrnoException, arg1?: number) => void
4856 ) => void;
4857 read: (
4858 arg0: number,
4859 arg1: Buffer,
4860 arg2: number,
4861 arg3: number,
4862 arg4: number,
4863 arg5: (arg0?: null | NodeJS.ErrnoException, arg1?: number) => void
4864 ) => void;
4865 close: (
4866 arg0: number,
4867 arg1: (arg0?: null | NodeJS.ErrnoException) => void
4868 ) => void;
4869 rename: (
4870 arg0: string,
4871 arg1: string,
4872 arg2: (arg0?: null | NodeJS.ErrnoException) => void
4873 ) => void;
4874}
4875type InternalCell<T> = T | typeof TOMBSTONE | typeof UNDEFINED_MARKER;
4876declare abstract class ItemCacheFacade {
4877 get<T>(callback: CallbackCache<T>): void;
4878 getPromise<T>(): Promise<T>;
4879 store<T>(data: T, callback: CallbackCache<void>): void;
4880 storePromise<T>(data: T): Promise<void>;
4881 provide<T>(
4882 computer: (arg0: CallbackNormalErrorCache<T>) => void,
4883 callback: CallbackNormalErrorCache<T>
4884 ): void;
4885 providePromise<T>(computer: () => T | Promise<T>): Promise<T>;
4886}
4887declare class JavascriptModulesPlugin {
4888 constructor(options?: object);
4889 options: object;
4890
4891 /**
4892 * Apply the plugin
4893 */
4894 apply(compiler: Compiler): void;
4895 renderModule(
4896 module: Module,
4897 renderContext: ChunkRenderContext,
4898 hooks: CompilationHooksJavascriptModulesPlugin,
4899 factory: boolean
4900 ): Source;
4901 renderChunk(
4902 renderContext: RenderContext,
4903 hooks: CompilationHooksJavascriptModulesPlugin
4904 ): Source;
4905 renderMain(
4906 renderContext: MainRenderContext,
4907 hooks: CompilationHooksJavascriptModulesPlugin,
4908 compilation: Compilation
4909 ): Source;
4910 updateHashWithBootstrap(
4911 hash: Hash,
4912 renderContext: RenderBootstrapContext,
4913 hooks: CompilationHooksJavascriptModulesPlugin
4914 ): void;
4915 renderBootstrap(
4916 renderContext: RenderBootstrapContext,
4917 hooks: CompilationHooksJavascriptModulesPlugin
4918 ): {
4919 header: string[];
4920 beforeStartup: string[];
4921 startup: string[];
4922 afterStartup: string[];
4923 allowInlineStartup: boolean;
4924 };
4925 renderRequire(
4926 renderContext: RenderBootstrapContext,
4927 hooks: CompilationHooksJavascriptModulesPlugin
4928 ): string;
4929 static getCompilationHooks(
4930 compilation: Compilation
4931 ): CompilationHooksJavascriptModulesPlugin;
4932 static getChunkFilenameTemplate(chunk?: any, outputOptions?: any): any;
4933 static chunkHasJs: (chunk: Chunk, chunkGraph: ChunkGraph) => boolean;
4934}
4935declare class JavascriptParser extends Parser {
4936 constructor(sourceType?: "module" | "auto" | "script");
4937 hooks: Readonly<{
4938 evaluateTypeof: HookMap<
4939 SyncBailHook<
4940 [UnaryExpression],
4941 undefined | null | BasicEvaluatedExpression
4942 >
4943 >;
4944 evaluate: HookMap<
4945 SyncBailHook<[Expression], undefined | null | BasicEvaluatedExpression>
4946 >;
4947 evaluateIdentifier: HookMap<
4948 SyncBailHook<
4949 [ThisExpression | MemberExpression | MetaProperty | Identifier],
4950 undefined | null | BasicEvaluatedExpression
4951 >
4952 >;
4953 evaluateDefinedIdentifier: HookMap<
4954 SyncBailHook<
4955 [ThisExpression | MemberExpression | Identifier],
4956 undefined | null | BasicEvaluatedExpression
4957 >
4958 >;
4959 evaluateNewExpression: HookMap<
4960 SyncBailHook<[NewExpression], undefined | null | BasicEvaluatedExpression>
4961 >;
4962 evaluateCallExpression: HookMap<
4963 SyncBailHook<
4964 [CallExpression],
4965 undefined | null | BasicEvaluatedExpression
4966 >
4967 >;
4968 evaluateCallExpressionMember: HookMap<
4969 SyncBailHook<
4970 [CallExpression, undefined | BasicEvaluatedExpression],
4971 undefined | null | BasicEvaluatedExpression
4972 >
4973 >;
4974 isPure: HookMap<
4975 SyncBailHook<
4976 [
4977 (
4978 | UnaryExpression
4979 | ThisExpression
4980 | ArrayExpression
4981 | ObjectExpression
4982 | FunctionExpression
4983 | ArrowFunctionExpression
4984 | YieldExpression
4985 | SimpleLiteral
4986 | RegExpLiteral
4987 | BigIntLiteral
4988 | UpdateExpression
4989 | BinaryExpression
4990 | AssignmentExpression
4991 | LogicalExpression
4992 | MemberExpression
4993 | ConditionalExpression
4994 | SimpleCallExpression
4995 | NewExpression
4996 | SequenceExpression
4997 | TemplateLiteral
4998 | TaggedTemplateExpression
4999 | ClassExpression
5000 | MetaProperty
5001 | Identifier
5002 | AwaitExpression
5003 | ImportExpression
5004 | ChainExpression
5005 | FunctionDeclaration
5006 | VariableDeclaration
5007 | ClassDeclaration
5008 | PrivateIdentifier
5009 ),
5010 number
5011 ],
5012 boolean | void
5013 >
5014 >;
5015 preStatement: SyncBailHook<
5016 [
5017 | FunctionDeclaration
5018 | VariableDeclaration
5019 | ClassDeclaration
5020 | ExpressionStatement
5021 | BlockStatement
5022 | StaticBlock
5023 | EmptyStatement
5024 | DebuggerStatement
5025 | WithStatement
5026 | ReturnStatement
5027 | LabeledStatement
5028 | BreakStatement
5029 | ContinueStatement
5030 | IfStatement
5031 | SwitchStatement
5032 | ThrowStatement
5033 | TryStatement
5034 | WhileStatement
5035 | DoWhileStatement
5036 | ForStatement
5037 | ForInStatement
5038 | ForOfStatement
5039 | ImportDeclaration
5040 | ExportNamedDeclaration
5041 | ExportDefaultDeclaration
5042 | ExportAllDeclaration
5043 ],
5044 boolean | void
5045 >;
5046 blockPreStatement: SyncBailHook<
5047 [
5048 | FunctionDeclaration
5049 | VariableDeclaration
5050 | ClassDeclaration
5051 | ExpressionStatement
5052 | BlockStatement
5053 | StaticBlock
5054 | EmptyStatement
5055 | DebuggerStatement
5056 | WithStatement
5057 | ReturnStatement
5058 | LabeledStatement
5059 | BreakStatement
5060 | ContinueStatement
5061 | IfStatement
5062 | SwitchStatement
5063 | ThrowStatement
5064 | TryStatement
5065 | WhileStatement
5066 | DoWhileStatement
5067 | ForStatement
5068 | ForInStatement
5069 | ForOfStatement
5070 | ImportDeclaration
5071 | ExportNamedDeclaration
5072 | ExportDefaultDeclaration
5073 | ExportAllDeclaration
5074 ],
5075 boolean | void
5076 >;
5077 statement: SyncBailHook<
5078 [
5079 | FunctionDeclaration
5080 | VariableDeclaration
5081 | ClassDeclaration
5082 | ExpressionStatement
5083 | BlockStatement
5084 | StaticBlock
5085 | EmptyStatement
5086 | DebuggerStatement
5087 | WithStatement
5088 | ReturnStatement
5089 | LabeledStatement
5090 | BreakStatement
5091 | ContinueStatement
5092 | IfStatement
5093 | SwitchStatement
5094 | ThrowStatement
5095 | TryStatement
5096 | WhileStatement
5097 | DoWhileStatement
5098 | ForStatement
5099 | ForInStatement
5100 | ForOfStatement
5101 | ImportDeclaration
5102 | ExportNamedDeclaration
5103 | ExportDefaultDeclaration
5104 | ExportAllDeclaration
5105 ],
5106 boolean | void
5107 >;
5108 statementIf: SyncBailHook<[IfStatement], boolean | void>;
5109 classExtendsExpression: SyncBailHook<
5110 [Expression, ClassExpression | ClassDeclaration],
5111 boolean | void
5112 >;
5113 classBodyElement: SyncBailHook<
5114 [
5115 MethodDefinition | PropertyDefinition,
5116 ClassExpression | ClassDeclaration
5117 ],
5118 boolean | void
5119 >;
5120 classBodyValue: SyncBailHook<
5121 [
5122 Expression,
5123 MethodDefinition | PropertyDefinition,
5124 ClassExpression | ClassDeclaration
5125 ],
5126 boolean | void
5127 >;
5128 label: HookMap<SyncBailHook<[LabeledStatement], boolean | void>>;
5129 import: SyncBailHook<[ImportDeclaration, ImportSource], boolean | void>;
5130 importSpecifier: SyncBailHook<
5131 [ImportDeclaration, ImportSource, string, string],
5132 boolean | void
5133 >;
5134 export: SyncBailHook<
5135 [ExportNamedDeclaration | ExportAllDeclaration],
5136 boolean | void
5137 >;
5138 exportImport: SyncBailHook<
5139 [ExportNamedDeclaration | ExportAllDeclaration, ImportSource],
5140 boolean | void
5141 >;
5142 exportDeclaration: SyncBailHook<
5143 [ExportNamedDeclaration | ExportAllDeclaration, Declaration],
5144 boolean | void
5145 >;
5146 exportExpression: SyncBailHook<
5147 [ExportDefaultDeclaration, Declaration],
5148 boolean | void
5149 >;
5150 exportSpecifier: SyncBailHook<
5151 [
5152 ExportNamedDeclaration | ExportAllDeclaration,
5153 string,
5154 string,
5155 undefined | number
5156 ],
5157 boolean | void
5158 >;
5159 exportImportSpecifier: SyncBailHook<
5160 [
5161 ExportNamedDeclaration | ExportAllDeclaration,
5162 ImportSource,
5163 string,
5164 string,
5165 undefined | number
5166 ],
5167 boolean | void
5168 >;
5169 preDeclarator: SyncBailHook<
5170 [VariableDeclarator, Statement],
5171 boolean | void
5172 >;
5173 declarator: SyncBailHook<[VariableDeclarator, Statement], boolean | void>;
5174 varDeclaration: HookMap<SyncBailHook<[Declaration], boolean | void>>;
5175 varDeclarationLet: HookMap<SyncBailHook<[Declaration], boolean | void>>;
5176 varDeclarationConst: HookMap<SyncBailHook<[Declaration], boolean | void>>;
5177 varDeclarationVar: HookMap<SyncBailHook<[Declaration], boolean | void>>;
5178 pattern: HookMap<SyncBailHook<[Identifier], boolean | void>>;
5179 canRename: HookMap<SyncBailHook<[Expression], boolean | void>>;
5180 rename: HookMap<SyncBailHook<[Expression], boolean | void>>;
5181 assign: HookMap<SyncBailHook<[AssignmentExpression], boolean | void>>;
5182 assignMemberChain: HookMap<
5183 SyncBailHook<[AssignmentExpression, string[]], boolean | void>
5184 >;
5185 typeof: HookMap<SyncBailHook<[Expression], boolean | void>>;
5186 importCall: SyncBailHook<[Expression], boolean | void>;
5187 topLevelAwait: SyncBailHook<[Expression], boolean | void>;
5188 call: HookMap<SyncBailHook<[Expression], boolean | void>>;
5189 callMemberChain: HookMap<
5190 SyncBailHook<[CallExpression, string[], boolean[]], boolean | void>
5191 >;
5192 memberChainOfCallMemberChain: HookMap<
5193 SyncBailHook<
5194 [Expression, string[], CallExpression, string[]],
5195 boolean | void
5196 >
5197 >;
5198 callMemberChainOfCallMemberChain: HookMap<
5199 SyncBailHook<
5200 [Expression, string[], CallExpression, string[]],
5201 boolean | void
5202 >
5203 >;
5204 optionalChaining: SyncBailHook<[ChainExpression], boolean | void>;
5205 new: HookMap<SyncBailHook<[NewExpression], boolean | void>>;
5206 binaryExpression: SyncBailHook<[BinaryExpression], boolean | void>;
5207 expression: HookMap<SyncBailHook<[Expression], boolean | void>>;
5208 expressionMemberChain: HookMap<
5209 SyncBailHook<[Expression, string[], boolean[]], boolean | void>
5210 >;
5211 unhandledExpressionMemberChain: HookMap<
5212 SyncBailHook<[Expression, string[]], boolean | void>
5213 >;
5214 expressionConditionalOperator: SyncBailHook<[Expression], boolean | void>;
5215 expressionLogicalOperator: SyncBailHook<[Expression], boolean | void>;
5216 program: SyncBailHook<[Program, Comment[]], boolean | void>;
5217 finish: SyncBailHook<[Program, Comment[]], boolean | void>;
5218 }>;
5219 sourceType: "module" | "auto" | "script";
5220 scope: ScopeInfo;
5221 state: ParserState;
5222 comments: any;
5223 semicolons: any;
5224 statementPath: (
5225 | UnaryExpression
5226 | ThisExpression
5227 | ArrayExpression
5228 | ObjectExpression
5229 | FunctionExpression
5230 | ArrowFunctionExpression
5231 | YieldExpression
5232 | SimpleLiteral
5233 | RegExpLiteral
5234 | BigIntLiteral
5235 | UpdateExpression
5236 | BinaryExpression
5237 | AssignmentExpression
5238 | LogicalExpression
5239 | MemberExpression
5240 | ConditionalExpression
5241 | SimpleCallExpression
5242 | NewExpression
5243 | SequenceExpression
5244 | TemplateLiteral
5245 | TaggedTemplateExpression
5246 | ClassExpression
5247 | MetaProperty
5248 | Identifier
5249 | AwaitExpression
5250 | ImportExpression
5251 | ChainExpression
5252 | FunctionDeclaration
5253 | VariableDeclaration
5254 | ClassDeclaration
5255 | ExpressionStatement
5256 | BlockStatement
5257 | StaticBlock
5258 | EmptyStatement
5259 | DebuggerStatement
5260 | WithStatement
5261 | ReturnStatement
5262 | LabeledStatement
5263 | BreakStatement
5264 | ContinueStatement
5265 | IfStatement
5266 | SwitchStatement
5267 | ThrowStatement
5268 | TryStatement
5269 | WhileStatement
5270 | DoWhileStatement
5271 | ForStatement
5272 | ForInStatement
5273 | ForOfStatement
5274 )[];
5275 prevStatement: any;
5276 currentTagData: any;
5277 getRenameIdentifier(expr?: any): undefined | string | VariableInfoInterface;
5278 walkClass(classy: ClassExpression | ClassDeclaration): void;
5279 preWalkStatements(statements?: any): void;
5280 blockPreWalkStatements(statements?: any): void;
5281 walkStatements(statements?: any): void;
5282 preWalkStatement(statement?: any): void;
5283 blockPreWalkStatement(statement?: any): void;
5284 walkStatement(statement?: any): void;
5285
5286 /**
5287 * Walks a statements that is nested within a parent statement
5288 * and can potentially be a non-block statement.
5289 * This enforces the nested statement to never be in ASI position.
5290 */
5291 walkNestedStatement(statement: Statement): void;
5292 preWalkBlockStatement(statement?: any): void;
5293 walkBlockStatement(statement?: any): void;
5294 walkExpressionStatement(statement?: any): void;
5295 preWalkIfStatement(statement?: any): void;
5296 walkIfStatement(statement?: any): void;
5297 preWalkLabeledStatement(statement?: any): void;
5298 walkLabeledStatement(statement?: any): void;
5299 preWalkWithStatement(statement?: any): void;
5300 walkWithStatement(statement?: any): void;
5301 preWalkSwitchStatement(statement?: any): void;
5302 walkSwitchStatement(statement?: any): void;
5303 walkTerminatingStatement(statement?: any): void;
5304 walkReturnStatement(statement?: any): void;
5305 walkThrowStatement(statement?: any): void;
5306 preWalkTryStatement(statement?: any): void;
5307 walkTryStatement(statement?: any): void;
5308 preWalkWhileStatement(statement?: any): void;
5309 walkWhileStatement(statement?: any): void;
5310 preWalkDoWhileStatement(statement?: any): void;
5311 walkDoWhileStatement(statement?: any): void;
5312 preWalkForStatement(statement?: any): void;
5313 walkForStatement(statement?: any): void;
5314 preWalkForInStatement(statement?: any): void;
5315 walkForInStatement(statement?: any): void;
5316 preWalkForOfStatement(statement?: any): void;
5317 walkForOfStatement(statement?: any): void;
5318 preWalkFunctionDeclaration(statement?: any): void;
5319 walkFunctionDeclaration(statement?: any): void;
5320 blockPreWalkImportDeclaration(statement?: any): void;
5321 enterDeclaration(declaration?: any, onIdent?: any): void;
5322 blockPreWalkExportNamedDeclaration(statement?: any): void;
5323 walkExportNamedDeclaration(statement?: any): void;
5324 blockPreWalkExportDefaultDeclaration(statement?: any): void;
5325 walkExportDefaultDeclaration(statement?: any): void;
5326 blockPreWalkExportAllDeclaration(statement?: any): void;
5327 preWalkVariableDeclaration(statement?: any): void;
5328 blockPreWalkVariableDeclaration(statement?: any): void;
5329 walkVariableDeclaration(statement?: any): void;
5330 blockPreWalkClassDeclaration(statement?: any): void;
5331 walkClassDeclaration(statement?: any): void;
5332 preWalkSwitchCases(switchCases?: any): void;
5333 walkSwitchCases(switchCases?: any): void;
5334 preWalkCatchClause(catchClause?: any): void;
5335 walkCatchClause(catchClause?: any): void;
5336 walkPattern(pattern?: any): void;
5337 walkAssignmentPattern(pattern?: any): void;
5338 walkObjectPattern(pattern?: any): void;
5339 walkArrayPattern(pattern?: any): void;
5340 walkRestElement(pattern?: any): void;
5341 walkExpressions(expressions?: any): void;
5342 walkExpression(expression?: any): void;
5343 walkAwaitExpression(expression?: any): void;
5344 walkArrayExpression(expression?: any): void;
5345 walkSpreadElement(expression?: any): void;
5346 walkObjectExpression(expression?: any): void;
5347 walkProperty(prop?: any): void;
5348 walkFunctionExpression(expression?: any): void;
5349 walkArrowFunctionExpression(expression?: any): void;
5350 walkSequenceExpression(expression: SequenceExpression): void;
5351 walkUpdateExpression(expression?: any): void;
5352 walkUnaryExpression(expression?: any): void;
5353 walkLeftRightExpression(expression?: any): void;
5354 walkBinaryExpression(expression?: any): void;
5355 walkLogicalExpression(expression?: any): void;
5356 walkAssignmentExpression(expression?: any): void;
5357 walkConditionalExpression(expression?: any): void;
5358 walkNewExpression(expression?: any): void;
5359 walkYieldExpression(expression?: any): void;
5360 walkTemplateLiteral(expression?: any): void;
5361 walkTaggedTemplateExpression(expression?: any): void;
5362 walkClassExpression(expression?: any): void;
5363 walkChainExpression(expression: ChainExpression): void;
5364 walkImportExpression(expression?: any): void;
5365 walkCallExpression(expression?: any): void;
5366 walkMemberExpression(expression?: any): void;
5367 walkMemberExpressionWithExpressionName(
5368 expression?: any,
5369 name?: any,
5370 rootInfo?: any,
5371 members?: any,
5372 onUnhandled?: any
5373 ): void;
5374 walkThisExpression(expression?: any): void;
5375 walkIdentifier(expression?: any): void;
5376 walkMetaProperty(metaProperty: MetaProperty): void;
5377 callHooksForExpression(hookMap: any, expr: any, ...args: any[]): any;
5378 callHooksForExpressionWithFallback<T, R>(
5379 hookMap: HookMap<SyncBailHook<T, R>>,
5380 expr: MemberExpression,
5381 fallback: (
5382 arg0: string,
5383 arg1: string | ScopeInfo | VariableInfo,
5384 arg2: () => string[]
5385 ) => any,
5386 defined: (arg0: string) => any,
5387 ...args: AsArray<T>
5388 ): R;
5389 callHooksForName<T, R>(
5390 hookMap: HookMap<SyncBailHook<T, R>>,
5391 name: string,
5392 ...args: AsArray<T>
5393 ): R;
5394 callHooksForInfo<T, R>(
5395 hookMap: HookMap<SyncBailHook<T, R>>,
5396 info: ExportedVariableInfo,
5397 ...args: AsArray<T>
5398 ): R;
5399 callHooksForInfoWithFallback<T, R>(
5400 hookMap: HookMap<SyncBailHook<T, R>>,
5401 info: ExportedVariableInfo,
5402 fallback: (arg0: string) => any,
5403 defined: () => any,
5404 ...args: AsArray<T>
5405 ): R;
5406 callHooksForNameWithFallback<T, R>(
5407 hookMap: HookMap<SyncBailHook<T, R>>,
5408 name: string,
5409 fallback: (arg0: string) => any,
5410 defined: () => any,
5411 ...args: AsArray<T>
5412 ): R;
5413 inScope(params: any, fn: () => void): void;
5414 inFunctionScope(hasThis?: any, params?: any, fn?: any): void;
5415 inBlockScope(fn?: any): void;
5416 detectMode(statements?: any): void;
5417 enterPatterns(patterns?: any, onIdent?: any): void;
5418 enterPattern(pattern?: any, onIdent?: any): void;
5419 enterIdentifier(pattern?: any, onIdent?: any): void;
5420 enterObjectPattern(pattern?: any, onIdent?: any): void;
5421 enterArrayPattern(pattern?: any, onIdent?: any): void;
5422 enterRestElement(pattern?: any, onIdent?: any): void;
5423 enterAssignmentPattern(pattern?: any, onIdent?: any): void;
5424 evaluateExpression(expression: Expression): BasicEvaluatedExpression;
5425 parseString(expression?: any): any;
5426 parseCalculatedString(expression?: any): any;
5427 evaluate(source: string): BasicEvaluatedExpression;
5428 isPure(
5429 expr:
5430 | undefined
5431 | null
5432 | UnaryExpression
5433 | ThisExpression
5434 | ArrayExpression
5435 | ObjectExpression
5436 | FunctionExpression
5437 | ArrowFunctionExpression
5438 | YieldExpression
5439 | SimpleLiteral
5440 | RegExpLiteral
5441 | BigIntLiteral
5442 | UpdateExpression
5443 | BinaryExpression
5444 | AssignmentExpression
5445 | LogicalExpression
5446 | MemberExpression
5447 | ConditionalExpression
5448 | SimpleCallExpression
5449 | NewExpression
5450 | SequenceExpression
5451 | TemplateLiteral
5452 | TaggedTemplateExpression
5453 | ClassExpression
5454 | MetaProperty
5455 | Identifier
5456 | AwaitExpression
5457 | ImportExpression
5458 | ChainExpression
5459 | FunctionDeclaration
5460 | VariableDeclaration
5461 | ClassDeclaration
5462 | PrivateIdentifier,
5463 commentsStartPos: number
5464 ): boolean;
5465 getComments(range?: any): any[];
5466 isAsiPosition(pos: number): boolean;
5467 unsetAsiPosition(pos: number): void;
5468 isStatementLevelExpression(expr?: any): boolean;
5469 getTagData(name?: any, tag?: any): any;
5470 tagVariable(name?: any, tag?: any, data?: any): void;
5471 defineVariable(name?: any): void;
5472 undefineVariable(name?: any): void;
5473 isVariableDefined(name?: any): boolean;
5474 getVariableInfo(name: string): ExportedVariableInfo;
5475 setVariable(name: string, variableInfo: ExportedVariableInfo): void;
5476 evaluatedVariable(tagInfo?: any): VariableInfo;
5477 parseCommentOptions(
5478 range?: any
5479 ): { options: null; errors: null } | { options: object; errors: unknown[] };
5480 extractMemberExpressionChain(expression: MemberExpression): {
5481 members: string[];
5482 object:
5483 | UnaryExpression
5484 | ThisExpression
5485 | ArrayExpression
5486 | ObjectExpression
5487 | FunctionExpression
5488 | ArrowFunctionExpression
5489 | YieldExpression
5490 | SimpleLiteral
5491 | RegExpLiteral
5492 | BigIntLiteral
5493 | UpdateExpression
5494 | BinaryExpression
5495 | AssignmentExpression
5496 | LogicalExpression
5497 | MemberExpression
5498 | ConditionalExpression
5499 | SimpleCallExpression
5500 | NewExpression
5501 | SequenceExpression
5502 | TemplateLiteral
5503 | TaggedTemplateExpression
5504 | ClassExpression
5505 | MetaProperty
5506 | Identifier
5507 | AwaitExpression
5508 | ImportExpression
5509 | ChainExpression
5510 | Super;
5511 membersOptionals: boolean[];
5512 };
5513 getFreeInfoFromVariable(varName: string): {
5514 name: string;
5515 info: string | VariableInfo;
5516 };
5517 getMemberExpressionInfo(
5518 expression: MemberExpression,
5519 allowedTypes: number
5520 ): undefined | CallExpressionInfo | ExpressionExpressionInfo;
5521 getNameForExpression(expression: MemberExpression): {
5522 name: string;
5523 rootInfo: ExportedVariableInfo;
5524 getMembers: () => string[];
5525 };
5526 static ALLOWED_MEMBER_TYPES_ALL: 3;
5527 static ALLOWED_MEMBER_TYPES_EXPRESSION: 2;
5528 static ALLOWED_MEMBER_TYPES_CALL_EXPRESSION: 1;
5529}
5530
5531/**
5532 * Parser options for javascript modules.
5533 */
5534declare interface JavascriptParserOptions {
5535 [index: string]: any;
5536
5537 /**
5538 * Set the value of `require.amd` and `define.amd`. Or disable AMD support.
5539 */
5540 amd?: false | { [index: string]: any };
5541
5542 /**
5543 * Enable/disable special handling for browserify bundles.
5544 */
5545 browserify?: boolean;
5546
5547 /**
5548 * Enable/disable parsing of CommonJs syntax.
5549 */
5550 commonjs?: boolean;
5551
5552 /**
5553 * Enable/disable parsing of magic comments in CommonJs syntax.
5554 */
5555 commonjsMagicComments?: boolean;
5556
5557 /**
5558 * Enable/disable parsing "import { createRequire } from "module"" and evaluating createRequire().
5559 */
5560 createRequire?: string | boolean;
5561
5562 /**
5563 * Specifies global mode for dynamic import.
5564 */
5565 dynamicImportMode?: "weak" | "eager" | "lazy" | "lazy-once";
5566
5567 /**
5568 * Specifies global prefetch for dynamic import.
5569 */
5570 dynamicImportPrefetch?: number | boolean;
5571
5572 /**
5573 * Specifies global preload for dynamic import.
5574 */
5575 dynamicImportPreload?: number | boolean;
5576
5577 /**
5578 * Specifies the behavior of invalid export names in "import ... from ..." and "export ... from ...".
5579 */
5580 exportsPresence?: false | "auto" | "error" | "warn";
5581
5582 /**
5583 * Enable warnings for full dynamic dependencies.
5584 */
5585 exprContextCritical?: boolean;
5586
5587 /**
5588 * Enable recursive directory lookup for full dynamic dependencies.
5589 */
5590 exprContextRecursive?: boolean;
5591
5592 /**
5593 * Sets the default regular expression for full dynamic dependencies.
5594 */
5595 exprContextRegExp?: boolean | RegExp;
5596
5597 /**
5598 * Set the default request for full dynamic dependencies.
5599 */
5600 exprContextRequest?: string;
5601
5602 /**
5603 * Enable/disable parsing of EcmaScript Modules syntax.
5604 */
5605 harmony?: boolean;
5606
5607 /**
5608 * Enable/disable parsing of import() syntax.
5609 */
5610 import?: boolean;
5611
5612 /**
5613 * Specifies the behavior of invalid export names in "import ... from ...".
5614 */
5615 importExportsPresence?: false | "auto" | "error" | "warn";
5616
5617 /**
5618 * Enable/disable evaluating import.meta.
5619 */
5620 importMeta?: boolean;
5621
5622 /**
5623 * Enable/disable evaluating import.meta.webpackContext.
5624 */
5625 importMetaContext?: boolean;
5626
5627 /**
5628 * Include polyfills or mocks for various node stuff.
5629 */
5630 node?: false | NodeOptions;
5631
5632 /**
5633 * 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.
5634 */
5635 reexportExportsPresence?: false | "auto" | "error" | "warn";
5636
5637 /**
5638 * Enable/disable parsing of require.context syntax.
5639 */
5640 requireContext?: boolean;
5641
5642 /**
5643 * Enable/disable parsing of require.ensure syntax.
5644 */
5645 requireEnsure?: boolean;
5646
5647 /**
5648 * Enable/disable parsing of require.include syntax.
5649 */
5650 requireInclude?: boolean;
5651
5652 /**
5653 * Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError.
5654 */
5655 requireJs?: boolean;
5656
5657 /**
5658 * Deprecated in favor of "exportsPresence". Emit errors instead of warnings when imported names don't exist in imported module.
5659 */
5660 strictExportPresence?: boolean;
5661
5662 /**
5663 * Handle the this context correctly according to the spec for namespace objects.
5664 */
5665 strictThisContextOnImports?: boolean;
5666
5667 /**
5668 * Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register.
5669 */
5670 system?: boolean;
5671
5672 /**
5673 * Enable warnings when using the require function in a not statically analyse-able way.
5674 */
5675 unknownContextCritical?: boolean;
5676
5677 /**
5678 * Enable recursive directory lookup when using the require function in a not statically analyse-able way.
5679 */
5680 unknownContextRecursive?: boolean;
5681
5682 /**
5683 * Sets the regular expression when using the require function in a not statically analyse-able way.
5684 */
5685 unknownContextRegExp?: boolean | RegExp;
5686
5687 /**
5688 * Sets the request when using the require function in a not statically analyse-able way.
5689 */
5690 unknownContextRequest?: string;
5691
5692 /**
5693 * Enable/disable parsing of new URL() syntax.
5694 */
5695 url?: boolean | "relative";
5696
5697 /**
5698 * Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register().
5699 */
5700 worker?: boolean | string[];
5701
5702 /**
5703 * Enable warnings for partial dynamic dependencies.
5704 */
5705 wrappedContextCritical?: boolean;
5706
5707 /**
5708 * Enable recursive directory lookup for partial dynamic dependencies.
5709 */
5710 wrappedContextRecursive?: boolean;
5711
5712 /**
5713 * Set the inner regular expression for partial dynamic dependencies.
5714 */
5715 wrappedContextRegExp?: RegExp;
5716}
5717declare class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
5718 constructor(runtimeRequirements?: any);
5719 static getCompilationHooks(
5720 compilation: Compilation
5721 ): JsonpCompilationPluginHooks;
5722
5723 /**
5724 * Runtime modules without any dependencies to other runtime modules
5725 */
5726 static STAGE_NORMAL: number;
5727
5728 /**
5729 * Runtime modules with simple dependencies on other runtime modules
5730 */
5731 static STAGE_BASIC: number;
5732
5733 /**
5734 * Runtime modules which attach to handlers of other runtime modules
5735 */
5736 static STAGE_ATTACH: number;
5737
5738 /**
5739 * Runtime modules which trigger actions on bootstrap
5740 */
5741 static STAGE_TRIGGER: number;
5742}
5743declare interface JsonpCompilationPluginHooks {
5744 linkPreload: SyncWaterfallHook<[string, Chunk]>;
5745 linkPrefetch: SyncWaterfallHook<[string, Chunk]>;
5746}
5747declare class JsonpTemplatePlugin {
5748 constructor();
5749
5750 /**
5751 * Apply the plugin
5752 */
5753 apply(compiler: Compiler): void;
5754 static getCompilationHooks(
5755 compilation: Compilation
5756 ): JsonpCompilationPluginHooks;
5757}
5758declare interface KnownAssetInfo {
5759 /**
5760 * true, if the asset can be long term cached forever (contains a hash)
5761 */
5762 immutable?: boolean;
5763
5764 /**
5765 * whether the asset is minimized
5766 */
5767 minimized?: boolean;
5768
5769 /**
5770 * the value(s) of the full hash used for this asset
5771 */
5772 fullhash?: string | string[];
5773
5774 /**
5775 * the value(s) of the chunk hash used for this asset
5776 */
5777 chunkhash?: string | string[];
5778
5779 /**
5780 * the value(s) of the module hash used for this asset
5781 */
5782 modulehash?: string | string[];
5783
5784 /**
5785 * the value(s) of the content hash used for this asset
5786 */
5787 contenthash?: string | string[];
5788
5789 /**
5790 * when asset was created from a source file (potentially transformed), the original filename relative to compilation context
5791 */
5792 sourceFilename?: string;
5793
5794 /**
5795 * size in bytes, only set after asset has been emitted
5796 */
5797 size?: number;
5798
5799 /**
5800 * true, when asset is only used for development and doesn't count towards user-facing assets
5801 */
5802 development?: boolean;
5803
5804 /**
5805 * true, when asset ships data for updating an existing application (HMR)
5806 */
5807 hotModuleReplacement?: boolean;
5808
5809 /**
5810 * true, when asset is javascript and an ESM
5811 */
5812 javascriptModule?: boolean;
5813
5814 /**
5815 * object of pointers to other assets, keyed by type of relation (only points from parent to child)
5816 */
5817 related?: Record<string, string | string[]>;
5818}
5819declare interface KnownBuildMeta {
5820 moduleArgument?: string;
5821 exportsArgument?: string;
5822 strict?: boolean;
5823 moduleConcatenationBailout?: string;
5824 exportsType?: "namespace" | "dynamic" | "default" | "flagged";
5825 defaultObject?: false | "redirect" | "redirect-warn";
5826 strictHarmonyModule?: boolean;
5827 async?: boolean;
5828 sideEffectFree?: boolean;
5829}
5830declare interface KnownCreateStatsOptionsContext {
5831 forToString?: boolean;
5832}
5833declare interface KnownNormalizedStatsOptions {
5834 context: string;
5835 requestShortener: RequestShortener;
5836 chunksSort: string;
5837 modulesSort: string;
5838 chunkModulesSort: string;
5839 nestedModulesSort: string;
5840 assetsSort: string;
5841 ids: boolean;
5842 cachedAssets: boolean;
5843 groupAssetsByEmitStatus: boolean;
5844 groupAssetsByPath: boolean;
5845 groupAssetsByExtension: boolean;
5846 assetsSpace: number;
5847 excludeAssets: ((value: string, asset: StatsAsset) => boolean)[];
5848 excludeModules: ((
5849 name: string,
5850 module: StatsModule,
5851 type: "module" | "chunk" | "root-of-chunk" | "nested"
5852 ) => boolean)[];
5853 warningsFilter: ((warning: StatsError, textValue: string) => boolean)[];
5854 cachedModules: boolean;
5855 orphanModules: boolean;
5856 dependentModules: boolean;
5857 runtimeModules: boolean;
5858 groupModulesByCacheStatus: boolean;
5859 groupModulesByLayer: boolean;
5860 groupModulesByAttributes: boolean;
5861 groupModulesByPath: boolean;
5862 groupModulesByExtension: boolean;
5863 groupModulesByType: boolean;
5864 entrypoints: boolean | "auto";
5865 chunkGroups: boolean;
5866 chunkGroupAuxiliary: boolean;
5867 chunkGroupChildren: boolean;
5868 chunkGroupMaxAssets: number;
5869 modulesSpace: number;
5870 chunkModulesSpace: number;
5871 nestedModulesSpace: number;
5872 logging: false | "none" | "error" | "warn" | "info" | "log" | "verbose";
5873 loggingDebug: ((value: string) => boolean)[];
5874 loggingTrace: boolean;
5875}
5876declare interface KnownStatsAsset {
5877 type: string;
5878 name: string;
5879 info: AssetInfo;
5880 size: number;
5881 emitted: boolean;
5882 comparedForEmit: boolean;
5883 cached: boolean;
5884 related?: StatsAsset[];
5885 chunkNames?: (string | number)[];
5886 chunkIdHints?: (string | number)[];
5887 chunks?: (string | number)[];
5888 auxiliaryChunkNames?: (string | number)[];
5889 auxiliaryChunks?: (string | number)[];
5890 auxiliaryChunkIdHints?: (string | number)[];
5891 filteredRelated?: number;
5892 isOverSizeLimit?: boolean;
5893}
5894declare interface KnownStatsChunk {
5895 rendered: boolean;
5896 initial: boolean;
5897 entry: boolean;
5898 recorded: boolean;
5899 reason?: string;
5900 size: number;
5901 sizes?: Record<string, number>;
5902 names?: string[];
5903 idHints?: string[];
5904 runtime?: string[];
5905 files?: string[];
5906 auxiliaryFiles?: string[];
5907 hash: string;
5908 childrenByOrder?: Record<string, (string | number)[]>;
5909 id?: string | number;
5910 siblings?: (string | number)[];
5911 parents?: (string | number)[];
5912 children?: (string | number)[];
5913 modules?: StatsModule[];
5914 filteredModules?: number;
5915 origins?: StatsChunkOrigin[];
5916}
5917declare interface KnownStatsChunkGroup {
5918 name?: string;
5919 chunks?: (string | number)[];
5920 assets?: { name: string; size?: number }[];
5921 filteredAssets?: number;
5922 assetsSize?: number;
5923 auxiliaryAssets?: { name: string; size?: number }[];
5924 filteredAuxiliaryAssets?: number;
5925 auxiliaryAssetsSize?: number;
5926 children?: { [index: string]: StatsChunkGroup[] };
5927 childAssets?: { [index: string]: string[] };
5928 isOverSizeLimit?: boolean;
5929}
5930declare interface KnownStatsChunkOrigin {
5931 module?: string;
5932 moduleIdentifier?: string;
5933 moduleName?: string;
5934 loc?: string;
5935 request?: string;
5936 moduleId?: string | number;
5937}
5938declare interface KnownStatsCompilation {
5939 env?: any;
5940 name?: string;
5941 hash?: string;
5942 version?: string;
5943 time?: number;
5944 builtAt?: number;
5945 needAdditionalPass?: boolean;
5946 publicPath?: string;
5947 outputPath?: string;
5948 assetsByChunkName?: Record<string, string[]>;
5949 assets?: StatsAsset[];
5950 filteredAssets?: number;
5951 chunks?: StatsChunk[];
5952 modules?: StatsModule[];
5953 filteredModules?: number;
5954 entrypoints?: Record<string, StatsChunkGroup>;
5955 namedChunkGroups?: Record<string, StatsChunkGroup>;
5956 errors?: StatsError[];
5957 errorsCount?: number;
5958 warnings?: StatsError[];
5959 warningsCount?: number;
5960 children?: StatsCompilation[];
5961 logging?: Record<string, StatsLogging>;
5962}
5963declare interface KnownStatsError {
5964 message: string;
5965 chunkName?: string;
5966 chunkEntry?: boolean;
5967 chunkInitial?: boolean;
5968 file?: string;
5969 moduleIdentifier?: string;
5970 moduleName?: string;
5971 loc?: string;
5972 chunkId?: string | number;
5973 moduleId?: string | number;
5974 moduleTrace?: StatsModuleTraceItem[];
5975 details?: any;
5976 stack?: string;
5977}
5978declare interface KnownStatsFactoryContext {
5979 type: string;
5980 makePathsRelative?: (arg0: string) => string;
5981 compilation?: Compilation;
5982 rootModules?: Set<Module>;
5983 compilationFileToChunks?: Map<string, Chunk[]>;
5984 compilationAuxiliaryFileToChunks?: Map<string, Chunk[]>;
5985 runtime?: RuntimeSpec;
5986 cachedGetErrors?: (arg0: Compilation) => WebpackError[];
5987 cachedGetWarnings?: (arg0: Compilation) => WebpackError[];
5988}
5989declare interface KnownStatsLogging {
5990 entries: StatsLoggingEntry[];
5991 filteredEntries: number;
5992 debug: boolean;
5993}
5994declare interface KnownStatsLoggingEntry {
5995 type: string;
5996 message: string;
5997 trace?: string[];
5998 children?: StatsLoggingEntry[];
5999 args?: any[];
6000 time?: number;
6001}
6002declare interface KnownStatsModule {
6003 type?: string;
6004 moduleType?: string;
6005 layer?: string;
6006 identifier?: string;
6007 name?: string;
6008 nameForCondition?: string;
6009 index?: number;
6010 preOrderIndex?: number;
6011 index2?: number;
6012 postOrderIndex?: number;
6013 size?: number;
6014 sizes?: { [index: string]: number };
6015 cacheable?: boolean;
6016 built?: boolean;
6017 codeGenerated?: boolean;
6018 buildTimeExecuted?: boolean;
6019 cached?: boolean;
6020 optional?: boolean;
6021 orphan?: boolean;
6022 id?: string | number;
6023 issuerId?: string | number;
6024 chunks?: (string | number)[];
6025 assets?: (string | number)[];
6026 dependent?: boolean;
6027 issuer?: string;
6028 issuerName?: string;
6029 issuerPath?: StatsModuleIssuer[];
6030 failed?: boolean;
6031 errors?: number;
6032 warnings?: number;
6033 profile?: StatsProfile;
6034 reasons?: StatsModuleReason[];
6035 usedExports?: boolean | string[];
6036 providedExports?: string[];
6037 optimizationBailout?: string[];
6038 depth?: number;
6039 modules?: StatsModule[];
6040 filteredModules?: number;
6041 source?: string | Buffer;
6042}
6043declare interface KnownStatsModuleIssuer {
6044 identifier?: string;
6045 name?: string;
6046 id?: string | number;
6047 profile?: StatsProfile;
6048}
6049declare interface KnownStatsModuleReason {
6050 moduleIdentifier?: string;
6051 module?: string;
6052 moduleName?: string;
6053 resolvedModuleIdentifier?: string;
6054 resolvedModule?: string;
6055 type?: string;
6056 active: boolean;
6057 explanation?: string;
6058 userRequest?: string;
6059 loc?: string;
6060 moduleId?: string | number;
6061 resolvedModuleId?: string | number;
6062}
6063declare interface KnownStatsModuleTraceDependency {
6064 loc?: string;
6065}
6066declare interface KnownStatsModuleTraceItem {
6067 originIdentifier?: string;
6068 originName?: string;
6069 moduleIdentifier?: string;
6070 moduleName?: string;
6071 dependencies?: StatsModuleTraceDependency[];
6072 originId?: string | number;
6073 moduleId?: string | number;
6074}
6075declare interface KnownStatsPrinterContext {
6076 type?: string;
6077 compilation?: StatsCompilation;
6078 chunkGroup?: StatsChunkGroup;
6079 asset?: StatsAsset;
6080 module?: StatsModule;
6081 chunk?: StatsChunk;
6082 moduleReason?: StatsModuleReason;
6083 bold?: (str: string) => string;
6084 yellow?: (str: string) => string;
6085 red?: (str: string) => string;
6086 green?: (str: string) => string;
6087 magenta?: (str: string) => string;
6088 cyan?: (str: string) => string;
6089 formatFilename?: (file: string, oversize?: boolean) => string;
6090 formatModuleId?: (id: string) => string;
6091 formatChunkId?: (
6092 id: string,
6093 direction?: "parent" | "child" | "sibling"
6094 ) => string;
6095 formatSize?: (size: number) => string;
6096 formatDateTime?: (dateTime: number) => string;
6097 formatFlag?: (flag: string) => string;
6098 formatTime?: (time: number, boldQuantity?: boolean) => string;
6099 chunkGroupKind?: string;
6100}
6101declare interface KnownStatsProfile {
6102 total: number;
6103 resolving: number;
6104 restoring: number;
6105 building: number;
6106 integration: number;
6107 storing: number;
6108 additionalResolving: number;
6109 additionalIntegration: number;
6110 factory: number;
6111 dependencies: number;
6112}
6113
6114/**
6115 * Options for the default backend.
6116 */
6117declare interface LazyCompilationDefaultBackendOptions {
6118 /**
6119 * A custom client.
6120 */
6121 client?: string;
6122
6123 /**
6124 * Specifies where to listen to from the server.
6125 */
6126 listen?: number | ListenOptions | ((server: typeof Server) => void);
6127
6128 /**
6129 * Specifies the protocol the client should use to connect to the server.
6130 */
6131 protocol?: "http" | "https";
6132
6133 /**
6134 * Specifies how to create the server handling the EventSource requests.
6135 */
6136 server?: ServerOptionsImport | ServerOptionsHttps | (() => typeof Server);
6137}
6138
6139/**
6140 * Options for compiling entrypoints and import()s only when they are accessed.
6141 */
6142declare interface LazyCompilationOptions {
6143 /**
6144 * Specifies the backend that should be used for handling client keep alive.
6145 */
6146 backend?:
6147 | ((
6148 compiler: Compiler,
6149 callback: (err?: Error, api?: BackendApi) => void
6150 ) => void)
6151 | ((compiler: Compiler) => Promise<BackendApi>)
6152 | LazyCompilationDefaultBackendOptions;
6153
6154 /**
6155 * Enable/disable lazy compilation for entries.
6156 */
6157 entries?: boolean;
6158
6159 /**
6160 * Enable/disable lazy compilation for import() modules.
6161 */
6162 imports?: boolean;
6163
6164 /**
6165 * Specify which entrypoints or import()ed modules should be lazily compiled. This is matched with the imported module and not the entrypoint name.
6166 */
6167 test?: string | RegExp | ((module: Module) => boolean);
6168}
6169declare class LazySet<T> {
6170 constructor(iterable?: Iterable<T>);
6171 get size(): number;
6172 add(item: T): LazySet<T>;
6173 addAll(iterable: LazySet<T> | Iterable<T>): LazySet<T>;
6174 clear(): void;
6175 delete(value: T): boolean;
6176 entries(): IterableIterator<[T, T]>;
6177 forEach(
6178 callbackFn: (arg0: T, arg1: T, arg2: Set<T>) => void,
6179 thisArg?: any
6180 ): void;
6181 has(item: T): boolean;
6182 keys(): IterableIterator<T>;
6183 values(): IterableIterator<T>;
6184 serialize(__0: { write: any }): void;
6185 [Symbol.iterator](): IterableIterator<T>;
6186 static deserialize(__0: { read: any }): LazySet<any>;
6187}
6188declare interface LibIdentOptions {
6189 /**
6190 * absolute context path to which lib ident is relative to
6191 */
6192 context: string;
6193
6194 /**
6195 * object for caching
6196 */
6197 associatedObjectForCache?: Object;
6198}
6199declare class LibManifestPlugin {
6200 constructor(options?: any);
6201 options: any;
6202
6203 /**
6204 * Apply the plugin
6205 */
6206 apply(compiler: Compiler): void;
6207}
6208declare interface LibraryContext<T> {
6209 compilation: Compilation;
6210 chunkGraph: ChunkGraph;
6211 options: T;
6212}
6213
6214/**
6215 * Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.
6216 */
6217declare interface LibraryCustomUmdCommentObject {
6218 /**
6219 * Set comment for `amd` section in UMD.
6220 */
6221 amd?: string;
6222
6223 /**
6224 * Set comment for `commonjs` (exports) section in UMD.
6225 */
6226 commonjs?: string;
6227
6228 /**
6229 * Set comment for `commonjs2` (module.exports) section in UMD.
6230 */
6231 commonjs2?: string;
6232
6233 /**
6234 * Set comment for `root` (global variable) section in UMD.
6235 */
6236 root?: string;
6237}
6238
6239/**
6240 * Description object for all UMD variants of the library name.
6241 */
6242declare interface LibraryCustomUmdObject {
6243 /**
6244 * Name of the exposed AMD library in the UMD.
6245 */
6246 amd?: string;
6247
6248 /**
6249 * Name of the exposed commonjs export in the UMD.
6250 */
6251 commonjs?: string;
6252
6253 /**
6254 * Name of the property exposed globally by a UMD library.
6255 */
6256 root?: string | string[];
6257}
6258type LibraryExport = string | string[];
6259type LibraryName = string | string[] | LibraryCustomUmdObject;
6260
6261/**
6262 * Options for library.
6263 */
6264declare interface LibraryOptions {
6265 /**
6266 * Add a comment in the UMD wrapper.
6267 */
6268 auxiliaryComment?: string | LibraryCustomUmdCommentObject;
6269
6270 /**
6271 * Specify which export should be exposed as library.
6272 */
6273 export?: string | string[];
6274
6275 /**
6276 * The name of the library (some types allow unnamed libraries too).
6277 */
6278 name?: string | string[] | LibraryCustomUmdObject;
6279
6280 /**
6281 * 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).
6282 */
6283 type: string;
6284
6285 /**
6286 * If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.
6287 */
6288 umdNamedDefine?: boolean;
6289}
6290declare class LibraryTemplatePlugin {
6291 constructor(
6292 name: LibraryName,
6293 target: string,
6294 umdNamedDefine: boolean,
6295 auxiliaryComment: AuxiliaryComment,
6296 exportProperty: LibraryExport
6297 );
6298 library: {
6299 type: string;
6300 name: LibraryName;
6301 umdNamedDefine: boolean;
6302 auxiliaryComment: AuxiliaryComment;
6303 export: LibraryExport;
6304 };
6305
6306 /**
6307 * Apply the plugin
6308 */
6309 apply(compiler: Compiler): void;
6310}
6311declare class LimitChunkCountPlugin {
6312 constructor(options?: LimitChunkCountPluginOptions);
6313 options?: LimitChunkCountPluginOptions;
6314 apply(compiler: Compiler): void;
6315}
6316declare interface LimitChunkCountPluginOptions {
6317 /**
6318 * Constant overhead for a chunk.
6319 */
6320 chunkOverhead?: number;
6321
6322 /**
6323 * Multiplicator for initial chunks.
6324 */
6325 entryChunkMultiplicator?: number;
6326
6327 /**
6328 * Limit the maximum number of chunks using a value greater greater than or equal to 1.
6329 */
6330 maxChunks: number;
6331}
6332declare interface LoadScriptCompilationHooks {
6333 createScript: SyncWaterfallHook<[string, Chunk]>;
6334}
6335declare class LoadScriptRuntimeModule extends HelperRuntimeModule {
6336 constructor(withCreateScriptUrl?: boolean);
6337 static getCompilationHooks(
6338 compilation: Compilation
6339 ): LoadScriptCompilationHooks;
6340
6341 /**
6342 * Runtime modules without any dependencies to other runtime modules
6343 */
6344 static STAGE_NORMAL: number;
6345
6346 /**
6347 * Runtime modules with simple dependencies on other runtime modules
6348 */
6349 static STAGE_BASIC: number;
6350
6351 /**
6352 * Runtime modules which attach to handlers of other runtime modules
6353 */
6354 static STAGE_ATTACH: number;
6355
6356 /**
6357 * Runtime modules which trigger actions on bootstrap
6358 */
6359 static STAGE_TRIGGER: number;
6360}
6361
6362/**
6363 * Custom values available in the loader context.
6364 */
6365declare interface Loader {
6366 [index: string]: any;
6367}
6368type LoaderContext<OptionsType> = NormalModuleLoaderContext<OptionsType> &
6369 LoaderRunnerLoaderContext<OptionsType> &
6370 LoaderPluginLoaderContext &
6371 HotModuleReplacementPluginLoaderContext;
6372type LoaderDefinition<
6373 OptionsType = {},
6374 ContextAdditions = {}
6375> = LoaderDefinitionFunction<OptionsType, ContextAdditions> & {
6376 raw?: false;
6377 pitch?: PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>;
6378};
6379declare interface LoaderDefinitionFunction<
6380 OptionsType = {},
6381 ContextAdditions = {}
6382> {
6383 (
6384 this: NormalModuleLoaderContext<OptionsType> &
6385 LoaderRunnerLoaderContext<OptionsType> &
6386 LoaderPluginLoaderContext &
6387 HotModuleReplacementPluginLoaderContext &
6388 ContextAdditions,
6389 content: string,
6390 sourceMap?: string | SourceMap,
6391 additionalData?: AdditionalData
6392 ): string | void | Buffer | Promise<string | Buffer>;
6393}
6394declare interface LoaderItem {
6395 loader: string;
6396 options: any;
6397 ident: null | string;
6398 type: null | string;
6399}
6400declare interface LoaderModule<OptionsType = {}, ContextAdditions = {}> {
6401 default?:
6402 | RawLoaderDefinitionFunction<OptionsType, ContextAdditions>
6403 | LoaderDefinitionFunction<OptionsType, ContextAdditions>;
6404 raw?: false;
6405 pitch?: PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>;
6406}
6407declare class LoaderOptionsPlugin {
6408 constructor(options?: LoaderOptionsPluginOptions);
6409 options: LoaderOptionsPluginOptions;
6410
6411 /**
6412 * Apply the plugin
6413 */
6414 apply(compiler: Compiler): void;
6415}
6416declare interface LoaderOptionsPluginOptions {
6417 [index: string]: any;
6418
6419 /**
6420 * Whether loaders should be in debug mode or not. debug will be removed as of webpack 3.
6421 */
6422 debug?: boolean;
6423
6424 /**
6425 * Where loaders can be switched to minimize mode.
6426 */
6427 minimize?: boolean;
6428
6429 /**
6430 * A configuration object that can be used to configure older loaders.
6431 */
6432 options?: {
6433 [index: string]: any;
6434 /**
6435 * The context that can be used to configure older loaders.
6436 */
6437 context?: string;
6438 };
6439}
6440
6441/**
6442 * These properties are added by the LoaderPlugin
6443 */
6444declare interface LoaderPluginLoaderContext {
6445 /**
6446 * Resolves the given request to a module, applies all configured loaders and calls
6447 * back with the generated source, the sourceMap and the module instance (usually an
6448 * instance of NormalModule). Use this function if you need to know the source code
6449 * of another module to generate the result.
6450 */
6451 loadModule(
6452 request: string,
6453 callback: (
6454 err: null | Error,
6455 source: string,
6456 sourceMap: any,
6457 module: NormalModule
6458 ) => void
6459 ): void;
6460 importModule(
6461 request: string,
6462 options: ImportModuleOptions,
6463 callback: (err?: null | Error, exports?: any) => any
6464 ): void;
6465 importModule(request: string, options?: ImportModuleOptions): Promise<any>;
6466}
6467
6468/**
6469 * The properties are added by https://github.com/webpack/loader-runner
6470 */
6471declare interface LoaderRunnerLoaderContext<OptionsType> {
6472 /**
6473 * Add a directory as dependency of the loader result.
6474 */
6475 addContextDependency(context: string): void;
6476
6477 /**
6478 * Adds a file as dependency of the loader result in order to make them watchable.
6479 * For example, html-loader uses this technique as it finds src and src-set attributes.
6480 * Then, it sets the url's for those attributes as dependencies of the html file that is parsed.
6481 */
6482 addDependency(file: string): void;
6483 addMissingDependency(context: string): void;
6484
6485 /**
6486 * Make this loader async.
6487 */
6488 async(): (
6489 err?: null | Error,
6490 content?: string | Buffer,
6491 sourceMap?: string | SourceMap,
6492 additionalData?: AdditionalData
6493 ) => void;
6494
6495 /**
6496 * Make this loader result cacheable. By default it's cacheable.
6497 * A cacheable loader must have a deterministic result, when inputs and dependencies haven't changed.
6498 * This means the loader shouldn't have other dependencies than specified with this.addDependency.
6499 * Most loaders are deterministic and cacheable.
6500 */
6501 cacheable(flag?: boolean): void;
6502 callback: (
6503 err?: null | Error,
6504 content?: string | Buffer,
6505 sourceMap?: string | SourceMap,
6506 additionalData?: AdditionalData
6507 ) => void;
6508
6509 /**
6510 * Remove all dependencies of the loader result. Even initial dependencies and these of other loaders.
6511 */
6512 clearDependencies(): void;
6513
6514 /**
6515 * The directory of the module. Can be used as context for resolving other stuff.
6516 * eg '/workspaces/ts-loader/examples/vanilla/src'
6517 */
6518 context: string;
6519 readonly currentRequest: string;
6520 readonly data: any;
6521
6522 /**
6523 * alias of addDependency
6524 * Adds a file as dependency of the loader result in order to make them watchable.
6525 * For example, html-loader uses this technique as it finds src and src-set attributes.
6526 * Then, it sets the url's for those attributes as dependencies of the html file that is parsed.
6527 */
6528 dependency(file: string): void;
6529 getContextDependencies(): string[];
6530 getDependencies(): string[];
6531 getMissingDependencies(): string[];
6532
6533 /**
6534 * The index in the loaders array of the current loader.
6535 * In the example: in loader1: 0, in loader2: 1
6536 */
6537 loaderIndex: number;
6538 readonly previousRequest: string;
6539 readonly query: string | OptionsType;
6540 readonly remainingRequest: string;
6541 readonly request: string;
6542
6543 /**
6544 * An array of all the loaders. It is writeable in the pitch phase.
6545 * loaders = [{request: string, path: string, query: string, module: function}]
6546 * In the example:
6547 * [
6548 * { request: "/abc/loader1.js?xyz",
6549 * path: "/abc/loader1.js",
6550 * query: "?xyz",
6551 * module: [Function]
6552 * },
6553 * { request: "/abc/node_modules/loader2/index.js",
6554 * path: "/abc/node_modules/loader2/index.js",
6555 * query: "",
6556 * module: [Function]
6557 * }
6558 * ]
6559 */
6560 loaders: {
6561 request: string;
6562 path: string;
6563 query: string;
6564 fragment: string;
6565 options?: string | object;
6566 ident: string;
6567 normal?: Function;
6568 pitch?: Function;
6569 raw?: boolean;
6570 data?: object;
6571 pitchExecuted: boolean;
6572 normalExecuted: boolean;
6573 }[];
6574
6575 /**
6576 * The resource path.
6577 * In the example: "/abc/resource.js"
6578 */
6579 resourcePath: string;
6580
6581 /**
6582 * The resource query string.
6583 * Example: "?query"
6584 */
6585 resourceQuery: string;
6586
6587 /**
6588 * The resource fragment.
6589 * Example: "#frag"
6590 */
6591 resourceFragment: string;
6592
6593 /**
6594 * The resource inclusive query and fragment.
6595 * Example: "/abc/resource.js?query#frag"
6596 */
6597 resource: string;
6598
6599 /**
6600 * Target of compilation.
6601 * Example: "web"
6602 */
6603 target: string;
6604}
6605declare class LoaderTargetPlugin {
6606 constructor(target: string);
6607 target: string;
6608
6609 /**
6610 * Apply the plugin
6611 */
6612 apply(compiler: Compiler): void;
6613}
6614declare interface LogEntry {
6615 type: string;
6616 args: any[];
6617 time: number;
6618 trace?: string[];
6619}
6620declare const MEASURE_END_OPERATION: unique symbol;
6621declare const MEASURE_START_OPERATION: unique symbol;
6622declare interface MainRenderContext {
6623 /**
6624 * the chunk
6625 */
6626 chunk: Chunk;
6627
6628 /**
6629 * the dependency templates
6630 */
6631 dependencyTemplates: DependencyTemplates;
6632
6633 /**
6634 * the runtime template
6635 */
6636 runtimeTemplate: RuntimeTemplate;
6637
6638 /**
6639 * the module graph
6640 */
6641 moduleGraph: ModuleGraph;
6642
6643 /**
6644 * the chunk graph
6645 */
6646 chunkGraph: ChunkGraph;
6647
6648 /**
6649 * results of code generation
6650 */
6651 codeGenerationResults: CodeGenerationResults;
6652
6653 /**
6654 * hash to be used for render call
6655 */
6656 hash: string;
6657
6658 /**
6659 * rendering in strict context
6660 */
6661 strictMode: boolean;
6662}
6663declare abstract class MainTemplate {
6664 hooks: Readonly<{
6665 renderManifest: { tap: (options?: any, fn?: any) => void };
6666 modules: { tap: () => never };
6667 moduleObj: { tap: () => never };
6668 require: { tap: (options?: any, fn?: any) => void };
6669 beforeStartup: { tap: () => never };
6670 startup: { tap: () => never };
6671 afterStartup: { tap: () => never };
6672 render: { tap: (options?: any, fn?: any) => void };
6673 renderWithEntry: { tap: (options?: any, fn?: any) => void };
6674 assetPath: {
6675 tap: (options?: any, fn?: any) => void;
6676 call: (filename?: any, options?: any) => string;
6677 };
6678 hash: { tap: (options?: any, fn?: any) => void };
6679 hashForChunk: { tap: (options?: any, fn?: any) => void };
6680 globalHashPaths: { tap: () => void };
6681 globalHash: { tap: () => void };
6682 hotBootstrap: { tap: () => never };
6683 bootstrap: SyncWaterfallHook<
6684 [string, Chunk, string, ModuleTemplate, DependencyTemplates]
6685 >;
6686 localVars: SyncWaterfallHook<[string, Chunk, string]>;
6687 requireExtensions: SyncWaterfallHook<[string, Chunk, string]>;
6688 requireEnsure: SyncWaterfallHook<[string, Chunk, string, string]>;
6689 get jsonpScript(): SyncWaterfallHook<[string, Chunk]>;
6690 get linkPrefetch(): SyncWaterfallHook<[string, Chunk]>;
6691 get linkPreload(): SyncWaterfallHook<[string, Chunk]>;
6692 }>;
6693 renderCurrentHashCode: (hash: string, length?: number) => string;
6694 getPublicPath: (options: object) => string;
6695 getAssetPath: (path?: any, options?: any) => string;
6696 getAssetPathWithInfo: (
6697 path?: any,
6698 options?: any
6699 ) => { path: string; info: AssetInfo };
6700 get requireFn(): "__webpack_require__";
6701 get outputOptions(): Output;
6702}
6703declare interface MapOptions {
6704 columns?: boolean;
6705 module?: boolean;
6706}
6707
6708/**
6709 * Options object for in-memory caching.
6710 */
6711declare interface MemoryCacheOptions {
6712 /**
6713 * Additionally cache computation of modules that are unchanged and reference only unchanged modules.
6714 */
6715 cacheUnaffected?: boolean;
6716
6717 /**
6718 * 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).
6719 */
6720 maxGenerations?: number;
6721
6722 /**
6723 * In memory caching.
6724 */
6725 type: "memory";
6726}
6727declare class MemoryCachePlugin {
6728 constructor();
6729
6730 /**
6731 * Apply the plugin
6732 */
6733 apply(compiler: Compiler): void;
6734}
6735declare class MinChunkSizePlugin {
6736 constructor(options: MinChunkSizePluginOptions);
6737 options: MinChunkSizePluginOptions;
6738
6739 /**
6740 * Apply the plugin
6741 */
6742 apply(compiler: Compiler): void;
6743}
6744declare interface MinChunkSizePluginOptions {
6745 /**
6746 * Constant overhead for a chunk.
6747 */
6748 chunkOverhead?: number;
6749
6750 /**
6751 * Multiplicator for initial chunks.
6752 */
6753 entryChunkMultiplicator?: number;
6754
6755 /**
6756 * Minimum number of characters.
6757 */
6758 minChunkSize: number;
6759}
6760declare class Module extends DependenciesBlock {
6761 constructor(type: string, context?: string, layer?: string);
6762 type: string;
6763 context: null | string;
6764 layer: null | string;
6765 needId: boolean;
6766 debugId: number;
6767 resolveOptions: ResolveOptionsWebpackOptions;
6768 factoryMeta?: object;
6769 useSourceMap: boolean;
6770 useSimpleSourceMap: boolean;
6771 buildMeta: BuildMeta;
6772 buildInfo: Record<string, any>;
6773 presentationalDependencies?: Dependency[];
6774 codeGenerationDependencies?: Dependency[];
6775 id: string | number;
6776 get hash(): string;
6777 get renderedHash(): string;
6778 profile: null | ModuleProfile;
6779 index: number;
6780 index2: number;
6781 depth: number;
6782 issuer: null | Module;
6783 get usedExports(): null | boolean | SortableSet<string>;
6784 get optimizationBailout(): (
6785 | string
6786 | ((requestShortener: RequestShortener) => string)
6787 )[];
6788 get optional(): boolean;
6789 addChunk(chunk?: any): boolean;
6790 removeChunk(chunk?: any): void;
6791 isInChunk(chunk?: any): boolean;
6792 isEntryModule(): boolean;
6793 getChunks(): Chunk[];
6794 getNumberOfChunks(): number;
6795 get chunksIterable(): Iterable<Chunk>;
6796 isProvided(exportName: string): null | boolean;
6797 get exportsArgument(): string;
6798 get moduleArgument(): string;
6799 getExportsType(
6800 moduleGraph: ModuleGraph,
6801 strict: boolean
6802 ): "namespace" | "default-only" | "default-with-named" | "dynamic";
6803 addPresentationalDependency(presentationalDependency: Dependency): void;
6804 addCodeGenerationDependency(codeGenerationDependency: Dependency): void;
6805 addWarning(warning: WebpackError): void;
6806 getWarnings(): undefined | Iterable<WebpackError>;
6807 getNumberOfWarnings(): number;
6808 addError(error: WebpackError): void;
6809 getErrors(): undefined | Iterable<WebpackError>;
6810 getNumberOfErrors(): number;
6811
6812 /**
6813 * removes all warnings and errors
6814 */
6815 clearWarningsAndErrors(): void;
6816 isOptional(moduleGraph: ModuleGraph): boolean;
6817 isAccessibleInChunk(
6818 chunkGraph: ChunkGraph,
6819 chunk: Chunk,
6820 ignoreChunk?: Chunk
6821 ): boolean;
6822 isAccessibleInChunkGroup(
6823 chunkGraph: ChunkGraph,
6824 chunkGroup: ChunkGroup,
6825 ignoreChunk?: Chunk
6826 ): boolean;
6827 hasReasonForChunk(
6828 chunk: Chunk,
6829 moduleGraph: ModuleGraph,
6830 chunkGraph: ChunkGraph
6831 ): boolean;
6832 hasReasons(moduleGraph: ModuleGraph, runtime: RuntimeSpec): boolean;
6833 needBuild(
6834 context: NeedBuildContext,
6835 callback: (arg0?: null | WebpackError, arg1?: boolean) => void
6836 ): void;
6837 needRebuild(
6838 fileTimestamps: Map<string, null | number>,
6839 contextTimestamps: Map<string, null | number>
6840 ): boolean;
6841 invalidateBuild(): void;
6842 identifier(): string;
6843 readableIdentifier(requestShortener: RequestShortener): string;
6844 build(
6845 options: WebpackOptionsNormalized,
6846 compilation: Compilation,
6847 resolver: ResolverWithOptions,
6848 fs: InputFileSystem,
6849 callback: (arg0?: WebpackError) => void
6850 ): void;
6851 getSourceTypes(): Set<string>;
6852 source(
6853 dependencyTemplates: DependencyTemplates,
6854 runtimeTemplate: RuntimeTemplate,
6855 type?: string
6856 ): Source;
6857 size(type?: string): number;
6858 libIdent(options: LibIdentOptions): null | string;
6859 nameForCondition(): null | string;
6860 getConcatenationBailoutReason(
6861 context: ConcatenationBailoutReasonContext
6862 ): undefined | string;
6863 getSideEffectsConnectionState(moduleGraph: ModuleGraph): ConnectionState;
6864 codeGeneration(context: CodeGenerationContext): CodeGenerationResult;
6865 chunkCondition(chunk: Chunk, compilation: Compilation): boolean;
6866 hasChunkCondition(): boolean;
6867
6868 /**
6869 * Assuming this module is in the cache. Update the (cached) module with
6870 * the fresh module from the factory. Usually updates internal references
6871 * and properties.
6872 */
6873 updateCacheModule(module: Module): void;
6874
6875 /**
6876 * Module should be unsafe cached. Get data that's needed for that.
6877 * This data will be passed to restoreFromUnsafeCache later.
6878 */
6879 getUnsafeCacheData(): object;
6880
6881 /**
6882 * Assuming this module is in the cache. Remove internal references to allow freeing some memory.
6883 */
6884 cleanupForCache(): void;
6885 originalSource(): null | Source;
6886 addCacheDependencies(
6887 fileDependencies: LazySet<string>,
6888 contextDependencies: LazySet<string>,
6889 missingDependencies: LazySet<string>,
6890 buildDependencies: LazySet<string>
6891 ): void;
6892 get hasEqualsChunks(): any;
6893 get isUsed(): any;
6894 get errors(): any;
6895 get warnings(): any;
6896 used: any;
6897}
6898declare class ModuleConcatenationPlugin {
6899 constructor(options?: any);
6900 options: any;
6901
6902 /**
6903 * Apply the plugin
6904 */
6905 apply(compiler: Compiler): void;
6906}
6907declare class ModuleDependency extends Dependency {
6908 constructor(request: string);
6909 request: string;
6910 userRequest: string;
6911 range: any;
6912 assertions?: Record<string, any>;
6913 static Template: typeof DependencyTemplate;
6914 static NO_EXPORTS_REFERENCED: string[][];
6915 static EXPORTS_OBJECT_REFERENCED: string[][];
6916 static TRANSITIVE: typeof TRANSITIVE;
6917}
6918declare abstract class ModuleFactory {
6919 create(
6920 data: ModuleFactoryCreateData,
6921 callback: (arg0?: Error, arg1?: ModuleFactoryResult) => void
6922 ): void;
6923}
6924declare interface ModuleFactoryCreateData {
6925 contextInfo: ModuleFactoryCreateDataContextInfo;
6926 resolveOptions?: ResolveOptionsWebpackOptions;
6927 context: string;
6928 dependencies: Dependency[];
6929}
6930declare interface ModuleFactoryCreateDataContextInfo {
6931 issuer: string;
6932 issuerLayer?: null | string;
6933 compiler: string;
6934}
6935declare interface ModuleFactoryResult {
6936 /**
6937 * the created module or unset if no module was created
6938 */
6939 module?: Module;
6940 fileDependencies?: Set<string>;
6941 contextDependencies?: Set<string>;
6942 missingDependencies?: Set<string>;
6943
6944 /**
6945 * allow to use the unsafe cache
6946 */
6947 cacheable?: boolean;
6948}
6949declare class ModuleFederationPlugin {
6950 constructor(options: ModuleFederationPluginOptions);
6951
6952 /**
6953 * Apply the plugin
6954 */
6955 apply(compiler: Compiler): void;
6956}
6957declare interface ModuleFederationPluginOptions {
6958 /**
6959 * 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.
6960 */
6961 exposes?: (string | ExposesObject)[] | ExposesObject;
6962
6963 /**
6964 * The filename of the container as relative path inside the `output.path` directory.
6965 */
6966 filename?: string;
6967
6968 /**
6969 * Options for library.
6970 */
6971 library?: LibraryOptions;
6972
6973 /**
6974 * The name of the container.
6975 */
6976 name?: string;
6977
6978 /**
6979 * The external type of the remote containers.
6980 */
6981 remoteType?:
6982 | "import"
6983 | "var"
6984 | "module"
6985 | "assign"
6986 | "this"
6987 | "window"
6988 | "self"
6989 | "global"
6990 | "commonjs"
6991 | "commonjs2"
6992 | "commonjs-module"
6993 | "commonjs-static"
6994 | "amd"
6995 | "amd-require"
6996 | "umd"
6997 | "umd2"
6998 | "jsonp"
6999 | "system"
7000 | "promise"
7001 | "script"
7002 | "node-commonjs";
7003
7004 /**
7005 * 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.
7006 */
7007 remotes?: (string | RemotesObject)[] | RemotesObject;
7008
7009 /**
7010 * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
7011 */
7012 runtime?: string | false;
7013
7014 /**
7015 * Share scope name used for all shared modules (defaults to 'default').
7016 */
7017 shareScope?: string;
7018
7019 /**
7020 * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.
7021 */
7022 shared?: (string | SharedObject)[] | SharedObject;
7023}
7024type ModuleFilterItemTypes =
7025 | string
7026 | RegExp
7027 | ((
7028 name: string,
7029 module: StatsModule,
7030 type: "module" | "chunk" | "root-of-chunk" | "nested"
7031 ) => boolean);
7032declare class ModuleGraph {
7033 constructor();
7034 setParents(
7035 dependency: Dependency,
7036 block: DependenciesBlock,
7037 module: Module,
7038 indexInBlock?: number
7039 ): void;
7040 getParentModule(dependency: Dependency): Module;
7041 getParentBlock(dependency: Dependency): DependenciesBlock;
7042 getParentBlockIndex(dependency: Dependency): number;
7043 setResolvedModule(
7044 originModule: Module,
7045 dependency: Dependency,
7046 module: Module
7047 ): void;
7048 updateModule(dependency: Dependency, module: Module): void;
7049 removeConnection(dependency: Dependency): void;
7050 addExplanation(dependency: Dependency, explanation: string): void;
7051 cloneModuleAttributes(sourceModule: Module, targetModule: Module): void;
7052 removeModuleAttributes(module: Module): void;
7053 removeAllModuleAttributes(): void;
7054 moveModuleConnections(
7055 oldModule: Module,
7056 newModule: Module,
7057 filterConnection: (arg0: ModuleGraphConnection) => boolean
7058 ): void;
7059 copyOutgoingModuleConnections(
7060 oldModule: Module,
7061 newModule: Module,
7062 filterConnection: (arg0: ModuleGraphConnection) => boolean
7063 ): void;
7064 addExtraReason(module: Module, explanation: string): void;
7065 getResolvedModule(dependency: Dependency): Module;
7066 getConnection(dependency: Dependency): undefined | ModuleGraphConnection;
7067 getModule(dependency: Dependency): Module;
7068 getOrigin(dependency: Dependency): Module;
7069 getResolvedOrigin(dependency: Dependency): Module;
7070 getIncomingConnections(module: Module): Iterable<ModuleGraphConnection>;
7071 getOutgoingConnections(module: Module): Iterable<ModuleGraphConnection>;
7072 getIncomingConnectionsByOriginModule(
7073 module: Module
7074 ): Map<undefined | Module, ReadonlyArray<ModuleGraphConnection>>;
7075 getOutgoingConnectionsByModule(
7076 module: Module
7077 ): undefined | Map<undefined | Module, ReadonlyArray<ModuleGraphConnection>>;
7078 getProfile(module: Module): null | ModuleProfile;
7079 setProfile(module: Module, profile: null | ModuleProfile): void;
7080 getIssuer(module: Module): null | Module;
7081 setIssuer(module: Module, issuer: null | Module): void;
7082 setIssuerIfUnset(module: Module, issuer: null | Module): void;
7083 getOptimizationBailout(
7084 module: Module
7085 ): (string | ((requestShortener: RequestShortener) => string))[];
7086 getProvidedExports(module: Module): null | true | string[];
7087 isExportProvided(
7088 module: Module,
7089 exportName: string | string[]
7090 ): null | boolean;
7091 getExportsInfo(module: Module): ExportsInfo;
7092 getExportInfo(module: Module, exportName: string): ExportInfo;
7093 getReadOnlyExportInfo(module: Module, exportName: string): ExportInfo;
7094 getUsedExports(
7095 module: Module,
7096 runtime: RuntimeSpec
7097 ): null | boolean | SortableSet<string>;
7098 getPreOrderIndex(module: Module): number;
7099 getPostOrderIndex(module: Module): number;
7100 setPreOrderIndex(module: Module, index: number): void;
7101 setPreOrderIndexIfUnset(module: Module, index: number): boolean;
7102 setPostOrderIndex(module: Module, index: number): void;
7103 setPostOrderIndexIfUnset(module: Module, index: number): boolean;
7104 getDepth(module: Module): number;
7105 setDepth(module: Module, depth: number): void;
7106 setDepthIfLower(module: Module, depth: number): boolean;
7107 isAsync(module: Module): boolean;
7108 setAsync(module: Module): void;
7109 getMeta(thing?: any): Object;
7110 getMetaIfExisting(thing?: any): Object;
7111 freeze(cacheStage?: string): void;
7112 unfreeze(): void;
7113 cached<T extends any[], V>(
7114 fn: (moduleGraph: ModuleGraph, ...args: T) => V,
7115 ...args: T
7116 ): V;
7117 setModuleMemCaches(
7118 moduleMemCaches: Map<Module, WeakTupleMap<any, any>>
7119 ): void;
7120 dependencyCacheProvide(dependency: Dependency, ...args: any[]): any;
7121 static getModuleGraphForModule(
7122 module: Module,
7123 deprecateMessage: string,
7124 deprecationCode: string
7125 ): ModuleGraph;
7126 static setModuleGraphForModule(
7127 module: Module,
7128 moduleGraph: ModuleGraph
7129 ): void;
7130 static clearModuleGraphForModule(module: Module): void;
7131 static ModuleGraphConnection: typeof ModuleGraphConnection;
7132}
7133declare class ModuleGraphConnection {
7134 constructor(
7135 originModule: null | Module,
7136 dependency: null | Dependency,
7137 module: Module,
7138 explanation?: string,
7139 weak?: boolean,
7140 condition?:
7141 | false
7142 | ((arg0: ModuleGraphConnection, arg1: RuntimeSpec) => ConnectionState)
7143 );
7144 originModule: null | Module;
7145 resolvedOriginModule: null | Module;
7146 dependency: null | Dependency;
7147 resolvedModule: Module;
7148 module: Module;
7149 weak: boolean;
7150 conditional: boolean;
7151 condition: (
7152 arg0: ModuleGraphConnection,
7153 arg1: RuntimeSpec
7154 ) => ConnectionState;
7155 explanations: Set<string>;
7156 clone(): ModuleGraphConnection;
7157 addCondition(
7158 condition: (
7159 arg0: ModuleGraphConnection,
7160 arg1: RuntimeSpec
7161 ) => ConnectionState
7162 ): void;
7163 addExplanation(explanation: string): void;
7164 get explanation(): string;
7165 active: void;
7166 isActive(runtime: RuntimeSpec): boolean;
7167 isTargetActive(runtime: RuntimeSpec): boolean;
7168 getActiveState(runtime: RuntimeSpec): ConnectionState;
7169 setActive(value: boolean): void;
7170 static addConnectionStates: (
7171 a: ConnectionState,
7172 b: ConnectionState
7173 ) => ConnectionState;
7174 static TRANSITIVE_ONLY: typeof TRANSITIVE_ONLY;
7175 static CIRCULAR_CONNECTION: typeof CIRCULAR_CONNECTION;
7176}
7177type ModuleInfo = ConcatenatedModuleInfo | ExternalModuleInfo;
7178
7179/**
7180 * Options affecting the normal modules (`NormalModuleFactory`).
7181 */
7182declare interface ModuleOptions {
7183 /**
7184 * An array of rules applied by default for modules.
7185 */
7186 defaultRules?: (RuleSetRule | "...")[];
7187
7188 /**
7189 * Enable warnings for full dynamic dependencies.
7190 */
7191 exprContextCritical?: boolean;
7192
7193 /**
7194 * Enable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRecursive'.
7195 */
7196 exprContextRecursive?: boolean;
7197
7198 /**
7199 * Sets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRegExp'.
7200 */
7201 exprContextRegExp?: boolean | RegExp;
7202
7203 /**
7204 * Set the default request for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRequest'.
7205 */
7206 exprContextRequest?: string;
7207
7208 /**
7209 * Specify options for each generator.
7210 */
7211 generator?: GeneratorOptionsByModuleType;
7212
7213 /**
7214 * Don't parse files matching. It's matched against the full resolved request.
7215 */
7216 noParse?: string | Function | RegExp | (string | Function | RegExp)[];
7217
7218 /**
7219 * Specify options for each parser.
7220 */
7221 parser?: ParserOptionsByModuleType;
7222
7223 /**
7224 * An array of rules applied for modules.
7225 */
7226 rules?: (RuleSetRule | "...")[];
7227
7228 /**
7229 * Emit errors instead of warnings when imported names don't exist in imported module. Deprecated: This option has moved to 'module.parser.javascript.strictExportPresence'.
7230 */
7231 strictExportPresence?: boolean;
7232
7233 /**
7234 * Handle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to 'module.parser.javascript.strictThisContextOnImports'.
7235 */
7236 strictThisContextOnImports?: boolean;
7237
7238 /**
7239 * Enable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextCritical'.
7240 */
7241 unknownContextCritical?: boolean;
7242
7243 /**
7244 * 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'.
7245 */
7246 unknownContextRecursive?: boolean;
7247
7248 /**
7249 * 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'.
7250 */
7251 unknownContextRegExp?: boolean | RegExp;
7252
7253 /**
7254 * 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'.
7255 */
7256 unknownContextRequest?: string;
7257
7258 /**
7259 * Cache the resolving of module requests.
7260 */
7261 unsafeCache?: boolean | Function;
7262
7263 /**
7264 * Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextCritical'.
7265 */
7266 wrappedContextCritical?: boolean;
7267
7268 /**
7269 * Enable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRecursive'.
7270 */
7271 wrappedContextRecursive?: boolean;
7272
7273 /**
7274 * Set the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRegExp'.
7275 */
7276 wrappedContextRegExp?: RegExp;
7277}
7278
7279/**
7280 * Options affecting the normal modules (`NormalModuleFactory`).
7281 */
7282declare interface ModuleOptionsNormalized {
7283 /**
7284 * An array of rules applied by default for modules.
7285 */
7286 defaultRules: (RuleSetRule | "...")[];
7287
7288 /**
7289 * Specify options for each generator.
7290 */
7291 generator: GeneratorOptionsByModuleType;
7292
7293 /**
7294 * Don't parse files matching. It's matched against the full resolved request.
7295 */
7296 noParse?: string | Function | RegExp | (string | Function | RegExp)[];
7297
7298 /**
7299 * Specify options for each parser.
7300 */
7301 parser: ParserOptionsByModuleType;
7302
7303 /**
7304 * An array of rules applied for modules.
7305 */
7306 rules: (RuleSetRule | "...")[];
7307
7308 /**
7309 * Cache the resolving of module requests.
7310 */
7311 unsafeCache?: boolean | Function;
7312}
7313declare interface ModulePathData {
7314 id: string | number;
7315 hash: string;
7316 hashWithLength?: (arg0: number) => string;
7317}
7318declare abstract class ModuleProfile {
7319 startTime: number;
7320 factoryStartTime: number;
7321 factoryEndTime: number;
7322 factory: number;
7323 factoryParallelismFactor: number;
7324 restoringStartTime: number;
7325 restoringEndTime: number;
7326 restoring: number;
7327 restoringParallelismFactor: number;
7328 integrationStartTime: number;
7329 integrationEndTime: number;
7330 integration: number;
7331 integrationParallelismFactor: number;
7332 buildingStartTime: number;
7333 buildingEndTime: number;
7334 building: number;
7335 buildingParallelismFactor: number;
7336 storingStartTime: number;
7337 storingEndTime: number;
7338 storing: number;
7339 storingParallelismFactor: number;
7340 additionalFactoryTimes: any;
7341 additionalFactories: number;
7342 additionalFactoriesParallelismFactor: number;
7343 additionalIntegration: number;
7344 markFactoryStart(): void;
7345 markFactoryEnd(): void;
7346 markRestoringStart(): void;
7347 markRestoringEnd(): void;
7348 markIntegrationStart(): void;
7349 markIntegrationEnd(): void;
7350 markBuildingStart(): void;
7351 markBuildingEnd(): void;
7352 markStoringStart(): void;
7353 markStoringEnd(): void;
7354
7355 /**
7356 * Merge this profile into another one
7357 */
7358 mergeInto(realProfile: ModuleProfile): void;
7359}
7360declare interface ModuleReferenceOptions {
7361 /**
7362 * the properties/exports of the module
7363 */
7364 ids: string[];
7365
7366 /**
7367 * true, when this referenced export is called
7368 */
7369 call: boolean;
7370
7371 /**
7372 * true, when this referenced export is directly imported (not via property access)
7373 */
7374 directImport: boolean;
7375
7376 /**
7377 * if the position is ASI safe or unknown
7378 */
7379 asiSafe?: boolean;
7380}
7381declare interface ModuleSettings {
7382 /**
7383 * Specifies the layer in which the module should be placed in.
7384 */
7385 layer?: string;
7386
7387 /**
7388 * Module type to use for the module.
7389 */
7390 type?: string;
7391
7392 /**
7393 * Options for the resolver.
7394 */
7395 resolve?: ResolveOptionsWebpackOptions;
7396
7397 /**
7398 * Options for parsing.
7399 */
7400 parser?: { [index: string]: any };
7401
7402 /**
7403 * The options for the module generator.
7404 */
7405 generator?: { [index: string]: any };
7406
7407 /**
7408 * Flags a module as with or without side effects.
7409 */
7410 sideEffects?: boolean;
7411}
7412declare abstract class ModuleTemplate {
7413 type: string;
7414 hooks: Readonly<{
7415 content: { tap: (options?: any, fn?: any) => void };
7416 module: { tap: (options?: any, fn?: any) => void };
7417 render: { tap: (options?: any, fn?: any) => void };
7418 package: { tap: (options?: any, fn?: any) => void };
7419 hash: { tap: (options?: any, fn?: any) => void };
7420 }>;
7421 get runtimeTemplate(): any;
7422}
7423declare class MultiCompiler {
7424 constructor(
7425 compilers: Compiler[] | Record<string, Compiler>,
7426 options: MultiCompilerOptions
7427 );
7428 hooks: Readonly<{
7429 done: SyncHook<[MultiStats]>;
7430 invalid: MultiHook<SyncHook<[null | string, number]>>;
7431 run: MultiHook<AsyncSeriesHook<[Compiler]>>;
7432 watchClose: SyncHook<[]>;
7433 watchRun: MultiHook<AsyncSeriesHook<[Compiler]>>;
7434 infrastructureLog: MultiHook<SyncBailHook<[string, string, any[]], true>>;
7435 }>;
7436 compilers: Compiler[];
7437 dependencies: WeakMap<Compiler, string[]>;
7438 running: boolean;
7439 get options(): WebpackOptionsNormalized[] & MultiCompilerOptions;
7440 get outputPath(): string;
7441 inputFileSystem: InputFileSystem;
7442 outputFileSystem: OutputFileSystem;
7443 watchFileSystem: WatchFileSystem;
7444 intermediateFileSystem: IntermediateFileSystem;
7445 getInfrastructureLogger(name?: any): WebpackLogger;
7446 setDependencies(compiler: Compiler, dependencies: string[]): void;
7447 validateDependencies(callback: CallbackFunction<MultiStats>): boolean;
7448 runWithDependencies(
7449 compilers: Compiler[],
7450 fn: (compiler: Compiler, callback: CallbackFunction<MultiStats>) => any,
7451 callback: CallbackFunction<MultiStats>
7452 ): void;
7453 watch(
7454 watchOptions: WatchOptions | WatchOptions[],
7455 handler: CallbackFunction<MultiStats>
7456 ): MultiWatching;
7457 run(callback: CallbackFunction<MultiStats>): void;
7458 purgeInputFileSystem(): void;
7459 close(callback: CallbackFunction<void>): void;
7460}
7461declare interface MultiCompilerOptions {
7462 /**
7463 * how many Compilers are allows to run at the same time in parallel
7464 */
7465 parallelism?: number;
7466}
7467declare abstract class MultiStats {
7468 stats: Stats[];
7469 get hash(): string;
7470 hasErrors(): boolean;
7471 hasWarnings(): boolean;
7472 toJson(options?: any): StatsCompilation;
7473 toString(options?: any): string;
7474}
7475declare abstract class MultiWatching {
7476 watchings: Watching[];
7477 compiler: MultiCompiler;
7478 invalidate(callback?: any): void;
7479 suspend(): void;
7480 resume(): void;
7481 close(callback: CallbackFunction<void>): void;
7482}
7483declare class NamedChunkIdsPlugin {
7484 constructor(options?: any);
7485 delimiter: any;
7486 context: any;
7487
7488 /**
7489 * Apply the plugin
7490 */
7491 apply(compiler: Compiler): void;
7492}
7493declare class NamedModuleIdsPlugin {
7494 constructor(options?: any);
7495 options: any;
7496
7497 /**
7498 * Apply the plugin
7499 */
7500 apply(compiler: Compiler): void;
7501}
7502declare class NaturalModuleIdsPlugin {
7503 constructor();
7504
7505 /**
7506 * Apply the plugin
7507 */
7508 apply(compiler: Compiler): void;
7509}
7510declare interface NeedBuildContext {
7511 compilation: Compilation;
7512 fileSystemInfo: FileSystemInfo;
7513 valueCacheVersions: Map<string, string | Set<string>>;
7514}
7515declare class NoEmitOnErrorsPlugin {
7516 constructor();
7517
7518 /**
7519 * Apply the plugin
7520 */
7521 apply(compiler: Compiler): void;
7522}
7523declare class NodeEnvironmentPlugin {
7524 constructor(options: {
7525 /**
7526 * infrastructure logging options
7527 */
7528 infrastructureLogging: InfrastructureLogging;
7529 });
7530 options: {
7531 /**
7532 * infrastructure logging options
7533 */
7534 infrastructureLogging: InfrastructureLogging;
7535 };
7536
7537 /**
7538 * Apply the plugin
7539 */
7540 apply(compiler: Compiler): void;
7541}
7542type NodeEstreeIndex =
7543 | UnaryExpression
7544 | ThisExpression
7545 | ArrayExpression
7546 | ObjectExpression
7547 | FunctionExpression
7548 | ArrowFunctionExpression
7549 | YieldExpression
7550 | SimpleLiteral
7551 | RegExpLiteral
7552 | BigIntLiteral
7553 | UpdateExpression
7554 | BinaryExpression
7555 | AssignmentExpression
7556 | LogicalExpression
7557 | MemberExpression
7558 | ConditionalExpression
7559 | SimpleCallExpression
7560 | NewExpression
7561 | SequenceExpression
7562 | TemplateLiteral
7563 | TaggedTemplateExpression
7564 | ClassExpression
7565 | MetaProperty
7566 | Identifier
7567 | AwaitExpression
7568 | ImportExpression
7569 | ChainExpression
7570 | FunctionDeclaration
7571 | VariableDeclaration
7572 | ClassDeclaration
7573 | PrivateIdentifier
7574 | ExpressionStatement
7575 | BlockStatement
7576 | StaticBlock
7577 | EmptyStatement
7578 | DebuggerStatement
7579 | WithStatement
7580 | ReturnStatement
7581 | LabeledStatement
7582 | BreakStatement
7583 | ContinueStatement
7584 | IfStatement
7585 | SwitchStatement
7586 | ThrowStatement
7587 | TryStatement
7588 | WhileStatement
7589 | DoWhileStatement
7590 | ForStatement
7591 | ForInStatement
7592 | ForOfStatement
7593 | ImportDeclaration
7594 | ExportNamedDeclaration
7595 | ExportDefaultDeclaration
7596 | ExportAllDeclaration
7597 | MethodDefinition
7598 | PropertyDefinition
7599 | VariableDeclarator
7600 | Program
7601 | SwitchCase
7602 | CatchClause
7603 | Property
7604 | AssignmentProperty
7605 | Super
7606 | TemplateElement
7607 | SpreadElement
7608 | ObjectPattern
7609 | ArrayPattern
7610 | RestElement
7611 | AssignmentPattern
7612 | ClassBody
7613 | ImportSpecifier
7614 | ImportDefaultSpecifier
7615 | ImportNamespaceSpecifier
7616 | ExportSpecifier;
7617
7618/**
7619 * Options object for node compatibility features.
7620 */
7621declare interface NodeOptions {
7622 /**
7623 * Include a polyfill for the '__dirname' variable.
7624 */
7625 __dirname?: boolean | "warn-mock" | "mock" | "eval-only";
7626
7627 /**
7628 * Include a polyfill for the '__filename' variable.
7629 */
7630 __filename?: boolean | "warn-mock" | "mock" | "eval-only";
7631
7632 /**
7633 * Include a polyfill for the 'global' variable.
7634 */
7635 global?: boolean | "warn";
7636}
7637declare class NodeSourcePlugin {
7638 constructor();
7639
7640 /**
7641 * Apply the plugin
7642 */
7643 apply(compiler: Compiler): void;
7644}
7645declare class NodeTargetPlugin {
7646 constructor();
7647
7648 /**
7649 * Apply the plugin
7650 */
7651 apply(compiler: Compiler): void;
7652}
7653declare class NodeTemplatePlugin {
7654 constructor(options?: any);
7655
7656 /**
7657 * Apply the plugin
7658 */
7659 apply(compiler: Compiler): void;
7660}
7661type NodeWebpackOptions = false | NodeOptions;
7662declare class NormalModule extends Module {
7663 constructor(__0: NormalModuleCreateData);
7664 request: string;
7665 userRequest: string;
7666 rawRequest: string;
7667 binary: boolean;
7668 parser: Parser;
7669 parserOptions?: Record<string, any>;
7670 generator: Generator;
7671 generatorOptions?: Record<string, any>;
7672 resource: string;
7673 resourceResolveData?: Record<string, any>;
7674 matchResource?: string;
7675 loaders: LoaderItem[];
7676 error?: null | WebpackError;
7677 restoreFromUnsafeCache(
7678 unsafeCacheData?: any,
7679 normalModuleFactory?: any
7680 ): void;
7681 createSourceForAsset(
7682 context: string,
7683 name: string,
7684 content: string,
7685 sourceMap?: any,
7686 associatedObjectForCache?: Object
7687 ): Source;
7688 getCurrentLoader(loaderContext?: any, index?: any): null | LoaderItem;
7689 createSource(
7690 context: string,
7691 content: string | Buffer,
7692 sourceMap?: any,
7693 associatedObjectForCache?: Object
7694 ): Source;
7695 markModuleAsErrored(error: WebpackError): void;
7696 applyNoParseRule(rule?: any, content?: any): any;
7697 shouldPreventParsing(noParseRule?: any, request?: any): any;
7698 static getCompilationHooks(
7699 compilation: Compilation
7700 ): NormalModuleCompilationHooks;
7701 static deserialize(context?: any): NormalModule;
7702}
7703declare interface NormalModuleCompilationHooks {
7704 loader: SyncHook<[object, NormalModule]>;
7705 beforeLoaders: SyncHook<[LoaderItem[], NormalModule, object]>;
7706 beforeParse: SyncHook<[NormalModule]>;
7707 beforeSnapshot: SyncHook<[NormalModule]>;
7708 readResourceForScheme: HookMap<
7709 AsyncSeriesBailHook<[string, NormalModule], string | Buffer>
7710 >;
7711 readResource: HookMap<AsyncSeriesBailHook<[object], string | Buffer>>;
7712 needBuild: AsyncSeriesBailHook<[NormalModule, NeedBuildContext], boolean>;
7713}
7714declare interface NormalModuleCreateData {
7715 /**
7716 * an optional layer in which the module is
7717 */
7718 layer?: string;
7719
7720 /**
7721 * module type
7722 */
7723 type: string;
7724
7725 /**
7726 * request string
7727 */
7728 request: string;
7729
7730 /**
7731 * request intended by user (without loaders from config)
7732 */
7733 userRequest: string;
7734
7735 /**
7736 * request without resolving
7737 */
7738 rawRequest: string;
7739
7740 /**
7741 * list of loaders
7742 */
7743 loaders: LoaderItem[];
7744
7745 /**
7746 * path + query of the real resource
7747 */
7748 resource: string;
7749
7750 /**
7751 * resource resolve data
7752 */
7753 resourceResolveData?: Record<string, any>;
7754
7755 /**
7756 * context directory for resolving
7757 */
7758 context: string;
7759
7760 /**
7761 * path + query of the matched resource (virtual)
7762 */
7763 matchResource?: string;
7764
7765 /**
7766 * the parser used
7767 */
7768 parser: Parser;
7769
7770 /**
7771 * the options of the parser used
7772 */
7773 parserOptions?: Record<string, any>;
7774
7775 /**
7776 * the generator used
7777 */
7778 generator: Generator;
7779
7780 /**
7781 * the options of the generator used
7782 */
7783 generatorOptions?: Record<string, any>;
7784
7785 /**
7786 * options used for resolving requests from this module
7787 */
7788 resolveOptions?: ResolveOptionsWebpackOptions;
7789}
7790declare abstract class NormalModuleFactory extends ModuleFactory {
7791 hooks: Readonly<{
7792 resolve: AsyncSeriesBailHook<[ResolveData], false | void | Module>;
7793 resolveForScheme: HookMap<
7794 AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
7795 >;
7796 resolveInScheme: HookMap<
7797 AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
7798 >;
7799 factorize: AsyncSeriesBailHook<[ResolveData], Module>;
7800 beforeResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
7801 afterResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
7802 createModule: AsyncSeriesBailHook<
7803 [
7804 Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
7805 ResolveData
7806 ],
7807 void | Module
7808 >;
7809 module: SyncWaterfallHook<
7810 [
7811 Module,
7812 Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
7813 ResolveData
7814 ],
7815 Module
7816 >;
7817 createParser: HookMap<SyncBailHook<any, any>>;
7818 parser: HookMap<SyncHook<any>>;
7819 createGenerator: HookMap<SyncBailHook<any, any>>;
7820 generator: HookMap<SyncHook<any>>;
7821 }>;
7822 resolverFactory: ResolverFactory;
7823 ruleSet: RuleSet;
7824 context: string;
7825 fs: InputFileSystem;
7826 parserCache: Map<string, WeakMap<Object, any>>;
7827 generatorCache: Map<string, WeakMap<Object, Generator>>;
7828 cleanupForCache(): void;
7829 resolveResource(
7830 contextInfo?: any,
7831 context?: any,
7832 unresolvedResource?: any,
7833 resolver?: any,
7834 resolveContext?: any,
7835 callback?: any
7836 ): void;
7837 resolveRequestArray(
7838 contextInfo?: any,
7839 context?: any,
7840 array?: any,
7841 resolver?: any,
7842 resolveContext?: any,
7843 callback?: any
7844 ): any;
7845 getParser(type?: any, parserOptions?: object): any;
7846 createParser(type: string, parserOptions?: { [index: string]: any }): Parser;
7847 getGenerator(type?: any, generatorOptions?: object): undefined | Generator;
7848 createGenerator(type?: any, generatorOptions?: object): any;
7849 getResolver(type?: any, resolveOptions?: any): ResolverWithOptions;
7850}
7851
7852/**
7853 * These properties are added by the NormalModule
7854 */
7855declare interface NormalModuleLoaderContext<OptionsType> {
7856 version: number;
7857 getOptions(): OptionsType;
7858 getOptions(schema: Parameters<typeof validateFunction>[0]): OptionsType;
7859 emitWarning(warning: Error): void;
7860 emitError(error: Error): void;
7861 getLogger(name?: string): WebpackLogger;
7862 resolve(
7863 context: string,
7864 request: string,
7865 callback: (
7866 arg0: null | Error,
7867 arg1?: string | false,
7868 arg2?: ResolveRequest
7869 ) => void
7870 ): any;
7871 getResolve(options?: ResolveOptionsWithDependencyType): {
7872 (
7873 context: string,
7874 request: string,
7875 callback: (
7876 arg0: null | Error,
7877 arg1?: string | false,
7878 arg2?: ResolveRequest
7879 ) => void
7880 ): void;
7881 (context: string, request: string): Promise<string>;
7882 };
7883 emitFile(
7884 name: string,
7885 content: string | Buffer,
7886 sourceMap?: string,
7887 assetInfo?: AssetInfo
7888 ): void;
7889 addBuildDependency(dep: string): void;
7890 utils: {
7891 absolutify: (context: string, request: string) => string;
7892 contextify: (context: string, request: string) => string;
7893 createHash: (algorithm?: string) => Hash;
7894 };
7895 rootContext: string;
7896 fs: InputFileSystem;
7897 sourceMap?: boolean;
7898 mode: "none" | "development" | "production";
7899 webpack?: boolean;
7900 _module?: NormalModule;
7901 _compilation?: Compilation;
7902 _compiler?: Compiler;
7903}
7904declare class NormalModuleReplacementPlugin {
7905 /**
7906 * Create an instance of the plugin
7907 */
7908 constructor(
7909 resourceRegExp: RegExp,
7910 newResource: string | ((arg0?: any) => void)
7911 );
7912 resourceRegExp: RegExp;
7913 newResource: string | ((arg0?: any) => void);
7914
7915 /**
7916 * Apply the plugin
7917 */
7918 apply(compiler: Compiler): void;
7919}
7920type NormalizedStatsOptions = KnownNormalizedStatsOptions &
7921 Omit<
7922 StatsOptions,
7923 | "context"
7924 | "chunkGroups"
7925 | "requestShortener"
7926 | "chunksSort"
7927 | "modulesSort"
7928 | "chunkModulesSort"
7929 | "nestedModulesSort"
7930 | "assetsSort"
7931 | "ids"
7932 | "cachedAssets"
7933 | "groupAssetsByEmitStatus"
7934 | "groupAssetsByPath"
7935 | "groupAssetsByExtension"
7936 | "assetsSpace"
7937 | "excludeAssets"
7938 | "excludeModules"
7939 | "warningsFilter"
7940 | "cachedModules"
7941 | "orphanModules"
7942 | "dependentModules"
7943 | "runtimeModules"
7944 | "groupModulesByCacheStatus"
7945 | "groupModulesByLayer"
7946 | "groupModulesByAttributes"
7947 | "groupModulesByPath"
7948 | "groupModulesByExtension"
7949 | "groupModulesByType"
7950 | "entrypoints"
7951 | "chunkGroupAuxiliary"
7952 | "chunkGroupChildren"
7953 | "chunkGroupMaxAssets"
7954 | "modulesSpace"
7955 | "chunkModulesSpace"
7956 | "nestedModulesSpace"
7957 | "logging"
7958 | "loggingDebug"
7959 | "loggingTrace"
7960 | "_env"
7961 > &
7962 Record<string, any>;
7963declare class NullDependency extends Dependency {
7964 constructor();
7965 static Template: typeof NullDependencyTemplate;
7966 static NO_EXPORTS_REFERENCED: string[][];
7967 static EXPORTS_OBJECT_REFERENCED: string[][];
7968 static TRANSITIVE: typeof TRANSITIVE;
7969}
7970declare class NullDependencyTemplate extends DependencyTemplate {
7971 constructor();
7972}
7973declare interface ObjectDeserializerContext {
7974 read: () => any;
7975}
7976declare interface ObjectSerializer {
7977 serialize: (arg0: any, arg1: ObjectSerializerContext) => void;
7978 deserialize: (arg0: ObjectDeserializerContext) => any;
7979}
7980declare interface ObjectSerializerContext {
7981 write: (arg0?: any) => void;
7982}
7983declare class OccurrenceChunkIdsPlugin {
7984 constructor(options?: OccurrenceChunkIdsPluginOptions);
7985 options: OccurrenceChunkIdsPluginOptions;
7986
7987 /**
7988 * Apply the plugin
7989 */
7990 apply(compiler: Compiler): void;
7991}
7992declare interface OccurrenceChunkIdsPluginOptions {
7993 /**
7994 * Prioritise initial size over total size.
7995 */
7996 prioritiseInitial?: boolean;
7997}
7998declare class OccurrenceModuleIdsPlugin {
7999 constructor(options?: OccurrenceModuleIdsPluginOptions);
8000 options: OccurrenceModuleIdsPluginOptions;
8001
8002 /**
8003 * Apply the plugin
8004 */
8005 apply(compiler: Compiler): void;
8006}
8007declare interface OccurrenceModuleIdsPluginOptions {
8008 /**
8009 * Prioritise initial size over total size.
8010 */
8011 prioritiseInitial?: boolean;
8012}
8013
8014/**
8015 * Enables/Disables integrated optimizations.
8016 */
8017declare interface Optimization {
8018 /**
8019 * Check for incompatible wasm types when importing/exporting from/to ESM.
8020 */
8021 checkWasmTypes?: boolean;
8022
8023 /**
8024 * 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).
8025 */
8026 chunkIds?:
8027 | false
8028 | "natural"
8029 | "named"
8030 | "deterministic"
8031 | "size"
8032 | "total-size";
8033
8034 /**
8035 * Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer.
8036 */
8037 concatenateModules?: boolean;
8038
8039 /**
8040 * Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime.
8041 */
8042 emitOnErrors?: boolean;
8043
8044 /**
8045 * Also flag chunks as loaded which contain a subset of the modules.
8046 */
8047 flagIncludedChunks?: boolean;
8048
8049 /**
8050 * Creates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection.
8051 */
8052 innerGraph?: boolean;
8053
8054 /**
8055 * 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).
8056 */
8057 mangleExports?: boolean | "deterministic" | "size";
8058
8059 /**
8060 * Reduce size of WASM by changing imports to shorter strings.
8061 */
8062 mangleWasmImports?: boolean;
8063
8064 /**
8065 * Merge chunks which contain the same modules.
8066 */
8067 mergeDuplicateChunks?: boolean;
8068
8069 /**
8070 * Enable minimizing the output. Uses optimization.minimizer.
8071 */
8072 minimize?: boolean;
8073
8074 /**
8075 * Minimizer(s) to use for minimizing the output.
8076 */
8077 minimizer?: (
8078 | ((this: Compiler, compiler: Compiler) => void)
8079 | WebpackPluginInstance
8080 | "..."
8081 )[];
8082
8083 /**
8084 * 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).
8085 */
8086 moduleIds?: false | "natural" | "named" | "deterministic" | "size" | "hashed";
8087
8088 /**
8089 * Avoid emitting assets when errors occur (deprecated: use 'emitOnErrors' instead).
8090 */
8091 noEmitOnErrors?: boolean;
8092
8093 /**
8094 * Set process.env.NODE_ENV to a specific value.
8095 */
8096 nodeEnv?: string | false;
8097
8098 /**
8099 * Generate records with relative paths to be able to move the context folder.
8100 */
8101 portableRecords?: boolean;
8102
8103 /**
8104 * Figure out which exports are provided by modules to generate more efficient code.
8105 */
8106 providedExports?: boolean;
8107
8108 /**
8109 * Use real [contenthash] based on final content of the assets.
8110 */
8111 realContentHash?: boolean;
8112
8113 /**
8114 * Removes modules from chunks when these modules are already included in all parents.
8115 */
8116 removeAvailableModules?: boolean;
8117
8118 /**
8119 * Remove chunks which are empty.
8120 */
8121 removeEmptyChunks?: boolean;
8122
8123 /**
8124 * Create an additional chunk which contains only the webpack runtime and chunk hash maps.
8125 */
8126 runtimeChunk?:
8127 | boolean
8128 | "single"
8129 | "multiple"
8130 | {
8131 /**
8132 * The name or name factory for the runtime chunks.
8133 */
8134 name?: string | Function;
8135 };
8136
8137 /**
8138 * 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).
8139 */
8140 sideEffects?: boolean | "flag";
8141
8142 /**
8143 * Optimize duplication and caching by splitting chunks by shared modules and cache group.
8144 */
8145 splitChunks?: false | OptimizationSplitChunksOptions;
8146
8147 /**
8148 * 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).
8149 */
8150 usedExports?: boolean | "global";
8151}
8152
8153/**
8154 * Options object for describing behavior of a cache group selecting modules that should be cached together.
8155 */
8156declare interface OptimizationSplitChunksCacheGroup {
8157 /**
8158 * Sets the name delimiter for created chunks.
8159 */
8160 automaticNameDelimiter?: string;
8161
8162 /**
8163 * Select chunks for determining cache group content (defaults to "initial", "initial" and "all" requires adding these chunks to the HTML).
8164 */
8165 chunks?: "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
8166
8167 /**
8168 * Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group.
8169 */
8170 enforce?: boolean;
8171
8172 /**
8173 * Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.
8174 */
8175 enforceSizeThreshold?: number | { [index: string]: number };
8176
8177 /**
8178 * Sets the template for the filename for created chunks.
8179 */
8180 filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
8181
8182 /**
8183 * Sets the hint for chunk id.
8184 */
8185 idHint?: string;
8186
8187 /**
8188 * Assign modules to a cache group by module layer.
8189 */
8190 layer?: string | Function | RegExp;
8191
8192 /**
8193 * Maximum number of requests which are accepted for on-demand loading.
8194 */
8195 maxAsyncRequests?: number;
8196
8197 /**
8198 * Maximal size hint for the on-demand chunks.
8199 */
8200 maxAsyncSize?: number | { [index: string]: number };
8201
8202 /**
8203 * Maximum number of initial chunks which are accepted for an entry point.
8204 */
8205 maxInitialRequests?: number;
8206
8207 /**
8208 * Maximal size hint for the initial chunks.
8209 */
8210 maxInitialSize?: number | { [index: string]: number };
8211
8212 /**
8213 * Maximal size hint for the created chunks.
8214 */
8215 maxSize?: number | { [index: string]: number };
8216
8217 /**
8218 * Minimum number of times a module has to be duplicated until it's considered for splitting.
8219 */
8220 minChunks?: number;
8221
8222 /**
8223 * Minimal size for the chunks the stay after moving the modules to a new chunk.
8224 */
8225 minRemainingSize?: number | { [index: string]: number };
8226
8227 /**
8228 * Minimal size for the created chunk.
8229 */
8230 minSize?: number | { [index: string]: number };
8231
8232 /**
8233 * Minimum size reduction due to the created chunk.
8234 */
8235 minSizeReduction?: number | { [index: string]: number };
8236
8237 /**
8238 * Give chunks for this cache group a name (chunks with equal name are merged).
8239 */
8240 name?: string | false | Function;
8241
8242 /**
8243 * Priority of this cache group.
8244 */
8245 priority?: number;
8246
8247 /**
8248 * Try to reuse existing chunk (with name) when it has matching modules.
8249 */
8250 reuseExistingChunk?: boolean;
8251
8252 /**
8253 * Assign modules to a cache group by module name.
8254 */
8255 test?: string | Function | RegExp;
8256
8257 /**
8258 * Assign modules to a cache group by module type.
8259 */
8260 type?: string | Function | RegExp;
8261
8262 /**
8263 * Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.
8264 */
8265 usedExports?: boolean;
8266}
8267
8268/**
8269 * Options object for splitting chunks into smaller chunks.
8270 */
8271declare interface OptimizationSplitChunksOptions {
8272 /**
8273 * Sets the name delimiter for created chunks.
8274 */
8275 automaticNameDelimiter?: string;
8276
8277 /**
8278 * Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks, default categories: 'default', 'defaultVendors').
8279 */
8280 cacheGroups?: {
8281 [index: string]:
8282 | string
8283 | false
8284 | Function
8285 | RegExp
8286 | OptimizationSplitChunksCacheGroup;
8287 };
8288
8289 /**
8290 * Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).
8291 */
8292 chunks?: "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
8293
8294 /**
8295 * Sets the size types which are used when a number is used for sizes.
8296 */
8297 defaultSizeTypes?: string[];
8298
8299 /**
8300 * Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.
8301 */
8302 enforceSizeThreshold?: number | { [index: string]: number };
8303
8304 /**
8305 * Options for modules not selected by any other cache group.
8306 */
8307 fallbackCacheGroup?: {
8308 /**
8309 * Sets the name delimiter for created chunks.
8310 */
8311 automaticNameDelimiter?: string;
8312 /**
8313 * Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).
8314 */
8315 chunks?: "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
8316 /**
8317 * Maximal size hint for the on-demand chunks.
8318 */
8319 maxAsyncSize?: number | { [index: string]: number };
8320 /**
8321 * Maximal size hint for the initial chunks.
8322 */
8323 maxInitialSize?: number | { [index: string]: number };
8324 /**
8325 * Maximal size hint for the created chunks.
8326 */
8327 maxSize?: number | { [index: string]: number };
8328 /**
8329 * Minimal size for the created chunk.
8330 */
8331 minSize?: number | { [index: string]: number };
8332 /**
8333 * Minimum size reduction due to the created chunk.
8334 */
8335 minSizeReduction?: number | { [index: string]: number };
8336 };
8337
8338 /**
8339 * Sets the template for the filename for created chunks.
8340 */
8341 filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
8342
8343 /**
8344 * Prevents exposing path info when creating names for parts splitted by maxSize.
8345 */
8346 hidePathInfo?: boolean;
8347
8348 /**
8349 * Maximum number of requests which are accepted for on-demand loading.
8350 */
8351 maxAsyncRequests?: number;
8352
8353 /**
8354 * Maximal size hint for the on-demand chunks.
8355 */
8356 maxAsyncSize?: number | { [index: string]: number };
8357
8358 /**
8359 * Maximum number of initial chunks which are accepted for an entry point.
8360 */
8361 maxInitialRequests?: number;
8362
8363 /**
8364 * Maximal size hint for the initial chunks.
8365 */
8366 maxInitialSize?: number | { [index: string]: number };
8367
8368 /**
8369 * Maximal size hint for the created chunks.
8370 */
8371 maxSize?: number | { [index: string]: number };
8372
8373 /**
8374 * Minimum number of times a module has to be duplicated until it's considered for splitting.
8375 */
8376 minChunks?: number;
8377
8378 /**
8379 * Minimal size for the chunks the stay after moving the modules to a new chunk.
8380 */
8381 minRemainingSize?: number | { [index: string]: number };
8382
8383 /**
8384 * Minimal size for the created chunks.
8385 */
8386 minSize?: number | { [index: string]: number };
8387
8388 /**
8389 * Minimum size reduction due to the created chunk.
8390 */
8391 minSizeReduction?: number | { [index: string]: number };
8392
8393 /**
8394 * Give chunks created a name (chunks with equal name are merged).
8395 */
8396 name?: string | false | Function;
8397
8398 /**
8399 * Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.
8400 */
8401 usedExports?: boolean;
8402}
8403declare abstract class OptionsApply {
8404 process(options?: any, compiler?: any): void;
8405}
8406declare interface OriginRecord {
8407 module: Module;
8408 loc: DependencyLocation;
8409 request: string;
8410}
8411declare class OriginalSource extends Source {
8412 constructor(source: string | Buffer, name: string);
8413 getName(): string;
8414}
8415
8416/**
8417 * Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
8418 */
8419declare interface Output {
8420 /**
8421 * The filename of asset modules as relative path inside the 'output.path' directory.
8422 */
8423 assetModuleFilename?:
8424 | string
8425 | ((pathData: PathData, assetInfo?: AssetInfo) => string);
8426
8427 /**
8428 * Enable/disable creating async chunks that are loaded on demand.
8429 */
8430 asyncChunks?: boolean;
8431
8432 /**
8433 * Add a comment in the UMD wrapper.
8434 */
8435 auxiliaryComment?: string | LibraryCustomUmdCommentObject;
8436
8437 /**
8438 * Add charset attribute for script tag.
8439 */
8440 charset?: boolean;
8441
8442 /**
8443 * 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.
8444 */
8445 chunkFilename?:
8446 | string
8447 | ((pathData: PathData, assetInfo?: AssetInfo) => string);
8448
8449 /**
8450 * 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).
8451 */
8452 chunkFormat?: string | false;
8453
8454 /**
8455 * Number of milliseconds before chunk request expires.
8456 */
8457 chunkLoadTimeout?: number;
8458
8459 /**
8460 * 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).
8461 */
8462 chunkLoading?: string | false;
8463
8464 /**
8465 * The global variable used by webpack for loading of chunks.
8466 */
8467 chunkLoadingGlobal?: string;
8468
8469 /**
8470 * Clean the output directory before emit.
8471 */
8472 clean?: boolean | CleanOptions;
8473
8474 /**
8475 * Check if to be emitted file already exists and have the same content before writing to output filesystem.
8476 */
8477 compareBeforeEmit?: boolean;
8478
8479 /**
8480 * This option enables cross-origin loading of chunks.
8481 */
8482 crossOriginLoading?: false | "anonymous" | "use-credentials";
8483
8484 /**
8485 * 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.
8486 */
8487 cssChunkFilename?:
8488 | string
8489 | ((pathData: PathData, assetInfo?: AssetInfo) => string);
8490
8491 /**
8492 * 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.
8493 */
8494 cssFilename?:
8495 | string
8496 | ((pathData: PathData, assetInfo?: AssetInfo) => string);
8497
8498 /**
8499 * Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
8500 */
8501 devtoolFallbackModuleFilenameTemplate?: string | Function;
8502
8503 /**
8504 * Filename template string of function for the sources array in a generated SourceMap.
8505 */
8506 devtoolModuleFilenameTemplate?: string | Function;
8507
8508 /**
8509 * 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.
8510 */
8511 devtoolNamespace?: string;
8512
8513 /**
8514 * List of chunk loading types enabled for use by entry points.
8515 */
8516 enabledChunkLoadingTypes?: string[];
8517
8518 /**
8519 * List of library types enabled for use by entry points.
8520 */
8521 enabledLibraryTypes?: string[];
8522
8523 /**
8524 * List of wasm loading types enabled for use by entry points.
8525 */
8526 enabledWasmLoadingTypes?: string[];
8527
8528 /**
8529 * The abilities of the environment where the webpack generated code should run.
8530 */
8531 environment?: Environment;
8532
8533 /**
8534 * 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.
8535 */
8536 filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
8537
8538 /**
8539 * An expression which is used to address the global object/scope in runtime code.
8540 */
8541 globalObject?: string;
8542
8543 /**
8544 * Digest type used for the hash.
8545 */
8546 hashDigest?: string;
8547
8548 /**
8549 * Number of chars which are used for the hash.
8550 */
8551 hashDigestLength?: number;
8552
8553 /**
8554 * Algorithm used for generation the hash (see node.js crypto package).
8555 */
8556 hashFunction?: string | typeof Hash;
8557
8558 /**
8559 * Any string which is added to the hash to salt it.
8560 */
8561 hashSalt?: string;
8562
8563 /**
8564 * The filename of the Hot Update Chunks. They are inside the output.path directory.
8565 */
8566 hotUpdateChunkFilename?: string;
8567
8568 /**
8569 * The global variable used by webpack for loading of hot update chunks.
8570 */
8571 hotUpdateGlobal?: string;
8572
8573 /**
8574 * The filename of the Hot Update Main File. It is inside the 'output.path' directory.
8575 */
8576 hotUpdateMainFilename?: string;
8577
8578 /**
8579 * Wrap javascript code into IIFE's to avoid leaking into global scope.
8580 */
8581 iife?: boolean;
8582
8583 /**
8584 * The name of the native import() function (can be exchanged for a polyfill).
8585 */
8586 importFunctionName?: string;
8587
8588 /**
8589 * The name of the native import.meta object (can be exchanged for a polyfill).
8590 */
8591 importMetaName?: string;
8592
8593 /**
8594 * Make the output files a library, exporting the exports of the entry point.
8595 */
8596 library?: string | string[] | LibraryOptions | LibraryCustomUmdObject;
8597
8598 /**
8599 * Specify which export should be exposed as library.
8600 */
8601 libraryExport?: string | string[];
8602
8603 /**
8604 * 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).
8605 */
8606 libraryTarget?: string;
8607
8608 /**
8609 * Output javascript files as module source type.
8610 */
8611 module?: boolean;
8612
8613 /**
8614 * The output directory as **absolute path** (required).
8615 */
8616 path?: string;
8617
8618 /**
8619 * Include comments with information about the modules.
8620 */
8621 pathinfo?: boolean | "verbose";
8622
8623 /**
8624 * The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
8625 */
8626 publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
8627
8628 /**
8629 * This option enables loading async chunks via a custom script type, such as script type="module".
8630 */
8631 scriptType?: false | "module" | "text/javascript";
8632
8633 /**
8634 * The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory.
8635 */
8636 sourceMapFilename?: string;
8637
8638 /**
8639 * Prefixes every line of the source in the bundle with this string.
8640 */
8641 sourcePrefix?: string;
8642
8643 /**
8644 * Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec.
8645 */
8646 strictModuleErrorHandling?: boolean;
8647
8648 /**
8649 * Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.
8650 */
8651 strictModuleExceptionHandling?: boolean;
8652
8653 /**
8654 * 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.
8655 */
8656 trustedTypes?: string | true | TrustedTypes;
8657
8658 /**
8659 * If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.
8660 */
8661 umdNamedDefine?: boolean;
8662
8663 /**
8664 * A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.
8665 */
8666 uniqueName?: string;
8667
8668 /**
8669 * 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).
8670 */
8671 wasmLoading?: string | false;
8672
8673 /**
8674 * The filename of WebAssembly modules as relative path inside the 'output.path' directory.
8675 */
8676 webassemblyModuleFilename?: string;
8677
8678 /**
8679 * 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).
8680 */
8681 workerChunkLoading?: string | false;
8682
8683 /**
8684 * 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).
8685 */
8686 workerWasmLoading?: string | false;
8687}
8688declare interface OutputFileSystem {
8689 writeFile: (
8690 arg0: string,
8691 arg1: string | Buffer,
8692 arg2: (arg0?: null | NodeJS.ErrnoException) => void
8693 ) => void;
8694 mkdir: (
8695 arg0: string,
8696 arg1: (arg0?: null | NodeJS.ErrnoException) => void
8697 ) => void;
8698 readdir?: (
8699 arg0: string,
8700 arg1: (
8701 arg0?: null | NodeJS.ErrnoException,
8702 arg1?: (string | Buffer)[] | IDirent[]
8703 ) => void
8704 ) => void;
8705 rmdir?: (
8706 arg0: string,
8707 arg1: (arg0?: null | NodeJS.ErrnoException) => void
8708 ) => void;
8709 unlink?: (
8710 arg0: string,
8711 arg1: (arg0?: null | NodeJS.ErrnoException) => void
8712 ) => void;
8713 stat: (
8714 arg0: string,
8715 arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
8716 ) => void;
8717 lstat?: (
8718 arg0: string,
8719 arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
8720 ) => void;
8721 readFile: (
8722 arg0: string,
8723 arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
8724 ) => void;
8725 join?: (arg0: string, arg1: string) => string;
8726 relative?: (arg0: string, arg1: string) => string;
8727 dirname?: (arg0: string) => string;
8728}
8729
8730/**
8731 * Normalized options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
8732 */
8733declare interface OutputNormalized {
8734 /**
8735 * The filename of asset modules as relative path inside the 'output.path' directory.
8736 */
8737 assetModuleFilename?:
8738 | string
8739 | ((pathData: PathData, assetInfo?: AssetInfo) => string);
8740
8741 /**
8742 * Enable/disable creating async chunks that are loaded on demand.
8743 */
8744 asyncChunks?: boolean;
8745
8746 /**
8747 * Add charset attribute for script tag.
8748 */
8749 charset?: boolean;
8750
8751 /**
8752 * 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.
8753 */
8754 chunkFilename?:
8755 | string
8756 | ((pathData: PathData, assetInfo?: AssetInfo) => string);
8757
8758 /**
8759 * 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).
8760 */
8761 chunkFormat?: string | false;
8762
8763 /**
8764 * Number of milliseconds before chunk request expires.
8765 */
8766 chunkLoadTimeout?: number;
8767
8768 /**
8769 * 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).
8770 */
8771 chunkLoading?: string | false;
8772
8773 /**
8774 * The global variable used by webpack for loading of chunks.
8775 */
8776 chunkLoadingGlobal?: string;
8777
8778 /**
8779 * Clean the output directory before emit.
8780 */
8781 clean?: boolean | CleanOptions;
8782
8783 /**
8784 * Check if to be emitted file already exists and have the same content before writing to output filesystem.
8785 */
8786 compareBeforeEmit?: boolean;
8787
8788 /**
8789 * This option enables cross-origin loading of chunks.
8790 */
8791 crossOriginLoading?: false | "anonymous" | "use-credentials";
8792
8793 /**
8794 * 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.
8795 */
8796 cssChunkFilename?:
8797 | string
8798 | ((pathData: PathData, assetInfo?: AssetInfo) => string);
8799
8800 /**
8801 * 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.
8802 */
8803 cssFilename?:
8804 | string
8805 | ((pathData: PathData, assetInfo?: AssetInfo) => string);
8806
8807 /**
8808 * Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
8809 */
8810 devtoolFallbackModuleFilenameTemplate?: string | Function;
8811
8812 /**
8813 * Filename template string of function for the sources array in a generated SourceMap.
8814 */
8815 devtoolModuleFilenameTemplate?: string | Function;
8816
8817 /**
8818 * 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.
8819 */
8820 devtoolNamespace?: string;
8821
8822 /**
8823 * List of chunk loading types enabled for use by entry points.
8824 */
8825 enabledChunkLoadingTypes?: string[];
8826
8827 /**
8828 * List of library types enabled for use by entry points.
8829 */
8830 enabledLibraryTypes?: string[];
8831
8832 /**
8833 * List of wasm loading types enabled for use by entry points.
8834 */
8835 enabledWasmLoadingTypes?: string[];
8836
8837 /**
8838 * The abilities of the environment where the webpack generated code should run.
8839 */
8840 environment?: Environment;
8841
8842 /**
8843 * 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.
8844 */
8845 filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
8846
8847 /**
8848 * An expression which is used to address the global object/scope in runtime code.
8849 */
8850 globalObject?: string;
8851
8852 /**
8853 * Digest type used for the hash.
8854 */
8855 hashDigest?: string;
8856
8857 /**
8858 * Number of chars which are used for the hash.
8859 */
8860 hashDigestLength?: number;
8861
8862 /**
8863 * Algorithm used for generation the hash (see node.js crypto package).
8864 */
8865 hashFunction?: string | typeof Hash;
8866
8867 /**
8868 * Any string which is added to the hash to salt it.
8869 */
8870 hashSalt?: string;
8871
8872 /**
8873 * The filename of the Hot Update Chunks. They are inside the output.path directory.
8874 */
8875 hotUpdateChunkFilename?: string;
8876
8877 /**
8878 * The global variable used by webpack for loading of hot update chunks.
8879 */
8880 hotUpdateGlobal?: string;
8881
8882 /**
8883 * The filename of the Hot Update Main File. It is inside the 'output.path' directory.
8884 */
8885 hotUpdateMainFilename?: string;
8886
8887 /**
8888 * Wrap javascript code into IIFE's to avoid leaking into global scope.
8889 */
8890 iife?: boolean;
8891
8892 /**
8893 * The name of the native import() function (can be exchanged for a polyfill).
8894 */
8895 importFunctionName?: string;
8896
8897 /**
8898 * The name of the native import.meta object (can be exchanged for a polyfill).
8899 */
8900 importMetaName?: string;
8901
8902 /**
8903 * Options for library.
8904 */
8905 library?: LibraryOptions;
8906
8907 /**
8908 * Output javascript files as module source type.
8909 */
8910 module?: boolean;
8911
8912 /**
8913 * The output directory as **absolute path** (required).
8914 */
8915 path?: string;
8916
8917 /**
8918 * Include comments with information about the modules.
8919 */
8920 pathinfo?: boolean | "verbose";
8921
8922 /**
8923 * The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
8924 */
8925 publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
8926
8927 /**
8928 * This option enables loading async chunks via a custom script type, such as script type="module".
8929 */
8930 scriptType?: false | "module" | "text/javascript";
8931
8932 /**
8933 * The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory.
8934 */
8935 sourceMapFilename?: string;
8936
8937 /**
8938 * Prefixes every line of the source in the bundle with this string.
8939 */
8940 sourcePrefix?: string;
8941
8942 /**
8943 * Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec.
8944 */
8945 strictModuleErrorHandling?: boolean;
8946
8947 /**
8948 * Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.
8949 */
8950 strictModuleExceptionHandling?: boolean;
8951
8952 /**
8953 * Use a Trusted Types policy to create urls for chunks.
8954 */
8955 trustedTypes?: TrustedTypes;
8956
8957 /**
8958 * A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.
8959 */
8960 uniqueName?: string;
8961
8962 /**
8963 * 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).
8964 */
8965 wasmLoading?: string | false;
8966
8967 /**
8968 * The filename of WebAssembly modules as relative path inside the 'output.path' directory.
8969 */
8970 webassemblyModuleFilename?: string;
8971
8972 /**
8973 * 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).
8974 */
8975 workerChunkLoading?: string | false;
8976
8977 /**
8978 * 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).
8979 */
8980 workerWasmLoading?: string | false;
8981}
8982declare interface ParameterizedComparator<TArg, T> {
8983 (arg0: TArg): Comparator<T>;
8984}
8985declare interface ParsedIdentifier {
8986 request: string;
8987 query: string;
8988 fragment: string;
8989 directory: boolean;
8990 module: boolean;
8991 file: boolean;
8992 internal: boolean;
8993}
8994declare class Parser {
8995 constructor();
8996 parse(
8997 source: string | Buffer | PreparsedAst,
8998 state: ParserState
8999 ): ParserState;
9000}
9001type ParserOptionsByModuleType = ParserOptionsByModuleTypeKnown &
9002 ParserOptionsByModuleTypeUnknown;
9003
9004/**
9005 * Specify options for each parser.
9006 */
9007declare interface ParserOptionsByModuleTypeKnown {
9008 /**
9009 * Parser options for asset modules.
9010 */
9011 asset?: AssetParserOptions;
9012
9013 /**
9014 * No parser options are supported for this module type.
9015 */
9016 "asset/inline"?: EmptyParserOptions;
9017
9018 /**
9019 * No parser options are supported for this module type.
9020 */
9021 "asset/resource"?: EmptyParserOptions;
9022
9023 /**
9024 * No parser options are supported for this module type.
9025 */
9026 "asset/source"?: EmptyParserOptions;
9027
9028 /**
9029 * Parser options for javascript modules.
9030 */
9031 javascript?: JavascriptParserOptions;
9032
9033 /**
9034 * Parser options for javascript modules.
9035 */
9036 "javascript/auto"?: JavascriptParserOptions;
9037
9038 /**
9039 * Parser options for javascript modules.
9040 */
9041 "javascript/dynamic"?: JavascriptParserOptions;
9042
9043 /**
9044 * Parser options for javascript modules.
9045 */
9046 "javascript/esm"?: JavascriptParserOptions;
9047}
9048
9049/**
9050 * Specify options for each parser.
9051 */
9052declare interface ParserOptionsByModuleTypeUnknown {
9053 [index: string]: { [index: string]: any };
9054}
9055type ParserState = Record<string, any> & ParserStateBase;
9056declare interface ParserStateBase {
9057 source: string | Buffer;
9058 current: NormalModule;
9059 module: NormalModule;
9060 compilation: Compilation;
9061 options: { [index: string]: any };
9062}
9063declare interface PathData {
9064 chunkGraph?: ChunkGraph;
9065 hash?: string;
9066 hashWithLength?: (arg0: number) => string;
9067 chunk?: Chunk | ChunkPathData;
9068 module?: Module | ModulePathData;
9069 runtime?: RuntimeSpec;
9070 filename?: string;
9071 basename?: string;
9072 query?: string;
9073 contentHashType?: string;
9074 contentHash?: string;
9075 contentHashWithLength?: (arg0: number) => string;
9076 noChunkHash?: boolean;
9077 url?: string;
9078}
9079
9080/**
9081 * Configuration object for web performance recommendations.
9082 */
9083declare interface PerformanceOptions {
9084 /**
9085 * Filter function to select assets that are checked.
9086 */
9087 assetFilter?: Function;
9088
9089 /**
9090 * Sets the format of the hints: warnings, errors or nothing at all.
9091 */
9092 hints?: false | "error" | "warning";
9093
9094 /**
9095 * File size limit (in bytes) when exceeded, that webpack will provide performance hints.
9096 */
9097 maxAssetSize?: number;
9098
9099 /**
9100 * Total size of an entry point (in bytes).
9101 */
9102 maxEntrypointSize?: number;
9103}
9104declare interface PitchLoaderDefinitionFunction<
9105 OptionsType = {},
9106 ContextAdditions = {}
9107> {
9108 (
9109 this: NormalModuleLoaderContext<OptionsType> &
9110 LoaderRunnerLoaderContext<OptionsType> &
9111 LoaderPluginLoaderContext &
9112 HotModuleReplacementPluginLoaderContext &
9113 ContextAdditions,
9114 remainingRequest: string,
9115 previousRequest: string,
9116 data: object
9117 ): string | void | Buffer | Promise<string | Buffer>;
9118}
9119type Plugin =
9120 | { apply: (arg0: Resolver) => void }
9121 | ((this: Resolver, arg1: Resolver) => void);
9122declare interface PnpApiImpl {
9123 resolveToUnqualified: (arg0: string, arg1: string, arg2: object) => string;
9124}
9125declare interface PossibleFileSystemError {
9126 code?: string;
9127 errno?: number;
9128 path?: string;
9129 syscall?: string;
9130}
9131declare class PrefetchPlugin {
9132 constructor(context?: any, request?: any);
9133 context: any;
9134 request: any;
9135
9136 /**
9137 * Apply the plugin
9138 */
9139 apply(compiler: Compiler): void;
9140}
9141declare class PrefixSource extends Source {
9142 constructor(prefix: string, source: string | Source);
9143 original(): Source;
9144 getPrefix(): string;
9145}
9146declare interface PreparsedAst {
9147 [index: string]: any;
9148}
9149declare interface PrintedElement {
9150 element: string;
9151 content: string;
9152}
9153declare interface Problem {
9154 type: ProblemType;
9155 path: string;
9156 argument: string;
9157 value?: any;
9158 index?: number;
9159 expected?: string;
9160}
9161type ProblemType =
9162 | "unknown-argument"
9163 | "unexpected-non-array-in-path"
9164 | "unexpected-non-object-in-path"
9165 | "multiple-values-unexpected"
9166 | "invalid-value";
9167declare interface ProcessAssetsAdditionalOptions {
9168 additionalAssets?: true | Function;
9169}
9170declare class Profiler {
9171 constructor(inspector?: any);
9172 session: any;
9173 inspector: any;
9174 hasSession(): boolean;
9175 startProfiling(): Promise<void> | Promise<[any, any, any]>;
9176 sendCommand(method?: any, params?: any): Promise<any>;
9177 destroy(): Promise<void>;
9178 stopProfiling(): Promise<{ profile: any }>;
9179}
9180declare class ProfilingPlugin {
9181 constructor(options?: ProfilingPluginOptions);
9182 outputPath: string;
9183 apply(compiler?: any): void;
9184 static Profiler: typeof Profiler;
9185}
9186declare interface ProfilingPluginOptions {
9187 /**
9188 * Path to the output file e.g. `path.resolve(__dirname, 'profiling/events.json')`. Defaults to `events.json`.
9189 */
9190 outputPath?: string;
9191}
9192declare class ProgressPlugin {
9193 constructor(options?: ProgressPluginArgument);
9194 profile?: null | boolean;
9195 handler?: (percentage: number, msg: string, ...args: string[]) => void;
9196 modulesCount?: number;
9197 dependenciesCount?: number;
9198 showEntries?: boolean;
9199 showModules?: boolean;
9200 showDependencies?: boolean;
9201 showActiveModules?: boolean;
9202 percentBy?: null | "modules" | "dependencies" | "entries";
9203 apply(compiler: Compiler | MultiCompiler): void;
9204 static getReporter(
9205 compiler: Compiler
9206 ): (p: number, ...args: string[]) => void;
9207 static defaultOptions: {
9208 profile: boolean;
9209 modulesCount: number;
9210 dependenciesCount: number;
9211 modules: boolean;
9212 dependencies: boolean;
9213 activeModules: boolean;
9214 entries: boolean;
9215 };
9216}
9217type ProgressPluginArgument =
9218 | ProgressPluginOptions
9219 | ((percentage: number, msg: string, ...args: string[]) => void);
9220
9221/**
9222 * Options object for the ProgressPlugin.
9223 */
9224declare interface ProgressPluginOptions {
9225 /**
9226 * Show active modules count and one active module in progress message.
9227 */
9228 activeModules?: boolean;
9229
9230 /**
9231 * Show dependencies count in progress message.
9232 */
9233 dependencies?: boolean;
9234
9235 /**
9236 * Minimum dependencies count to start with. For better progress calculation. Default: 10000.
9237 */
9238 dependenciesCount?: number;
9239
9240 /**
9241 * Show entries count in progress message.
9242 */
9243 entries?: boolean;
9244
9245 /**
9246 * Function that executes for every progress step.
9247 */
9248 handler?: (percentage: number, msg: string, ...args: string[]) => void;
9249
9250 /**
9251 * Show modules count in progress message.
9252 */
9253 modules?: boolean;
9254
9255 /**
9256 * Minimum modules count to start with. For better progress calculation. Default: 5000.
9257 */
9258 modulesCount?: number;
9259
9260 /**
9261 * Collect percent algorithm. By default it calculates by a median from modules, entries and dependencies percent.
9262 */
9263 percentBy?: null | "modules" | "dependencies" | "entries";
9264
9265 /**
9266 * Collect profile data for progress steps. Default: false.
9267 */
9268 profile?: null | boolean;
9269}
9270declare class ProvidePlugin {
9271 constructor(definitions: Record<string, string | string[]>);
9272 definitions: Record<string, string | string[]>;
9273
9274 /**
9275 * Apply the plugin
9276 */
9277 apply(compiler: Compiler): void;
9278}
9279declare class ProvideSharedPlugin {
9280 constructor(options: ProvideSharedPluginOptions);
9281
9282 /**
9283 * Apply the plugin
9284 */
9285 apply(compiler: Compiler): void;
9286}
9287declare interface ProvideSharedPluginOptions {
9288 /**
9289 * 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.
9290 */
9291 provides: Provides;
9292
9293 /**
9294 * Share scope name used for all provided modules (defaults to 'default').
9295 */
9296 shareScope?: string;
9297}
9298type Provides = (string | ProvidesObject)[] | ProvidesObject;
9299
9300/**
9301 * Advanced configuration for modules that should be provided as shared modules to the share scope.
9302 */
9303declare interface ProvidesConfig {
9304 /**
9305 * 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.
9306 */
9307 eager?: boolean;
9308
9309 /**
9310 * Key in the share scope under which the shared modules should be stored.
9311 */
9312 shareKey?: string;
9313
9314 /**
9315 * Share scope name.
9316 */
9317 shareScope?: string;
9318
9319 /**
9320 * Version of the provided module. Will replace lower matching versions, but not higher.
9321 */
9322 version?: string | false;
9323}
9324
9325/**
9326 * Modules that should be provided as shared modules to the share scope. Property names are used as share keys.
9327 */
9328declare interface ProvidesObject {
9329 [index: string]: string | ProvidesConfig;
9330}
9331declare interface RawChunkGroupOptions {
9332 preloadOrder?: number;
9333 prefetchOrder?: number;
9334}
9335type RawLoaderDefinition<
9336 OptionsType = {},
9337 ContextAdditions = {}
9338> = RawLoaderDefinitionFunction<OptionsType, ContextAdditions> & {
9339 raw: true;
9340 pitch?: PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>;
9341};
9342declare interface RawLoaderDefinitionFunction<
9343 OptionsType = {},
9344 ContextAdditions = {}
9345> {
9346 (
9347 this: NormalModuleLoaderContext<OptionsType> &
9348 LoaderRunnerLoaderContext<OptionsType> &
9349 LoaderPluginLoaderContext &
9350 HotModuleReplacementPluginLoaderContext &
9351 ContextAdditions,
9352 content: Buffer,
9353 sourceMap?: string | SourceMap,
9354 additionalData?: AdditionalData
9355 ): string | void | Buffer | Promise<string | Buffer>;
9356}
9357declare class RawSource extends Source {
9358 constructor(source: string | Buffer, convertToString?: boolean);
9359 isBuffer(): boolean;
9360}
9361declare class ReadFileCompileWasmPlugin {
9362 constructor(options?: any);
9363 options: any;
9364
9365 /**
9366 * Apply the plugin
9367 */
9368 apply(compiler: Compiler): void;
9369}
9370declare class RealContentHashPlugin {
9371 constructor(__0: { hashFunction: any; hashDigest: any });
9372
9373 /**
9374 * Apply the plugin
9375 */
9376 apply(compiler: Compiler): void;
9377 static getCompilationHooks(
9378 compilation: Compilation
9379 ): CompilationHooksRealContentHashPlugin;
9380}
9381declare interface RealDependencyLocation {
9382 start: SourcePosition;
9383 end?: SourcePosition;
9384 index?: number;
9385}
9386type RecursiveArrayOrRecord<T> =
9387 | { [index: string]: RecursiveArrayOrRecord<T> }
9388 | RecursiveArrayOrRecord<T>[]
9389 | T;
9390declare interface ReferencedExport {
9391 /**
9392 * name of the referenced export
9393 */
9394 name: string[];
9395
9396 /**
9397 * when false, referenced export can not be mangled, defaults to true
9398 */
9399 canMangle?: boolean;
9400}
9401type Remotes = (string | RemotesObject)[] | RemotesObject;
9402
9403/**
9404 * Advanced configuration for container locations from which modules should be resolved and loaded at runtime.
9405 */
9406declare interface RemotesConfig {
9407 /**
9408 * Container locations from which modules should be resolved and loaded at runtime.
9409 */
9410 external: string | string[];
9411
9412 /**
9413 * The name of the share scope shared with this remote.
9414 */
9415 shareScope?: string;
9416}
9417
9418/**
9419 * Container locations from which modules should be resolved and loaded at runtime. Property names are used as request scopes.
9420 */
9421declare interface RemotesObject {
9422 [index: string]: string | RemotesConfig | string[];
9423}
9424declare interface RenderBootstrapContext {
9425 /**
9426 * the chunk
9427 */
9428 chunk: Chunk;
9429
9430 /**
9431 * results of code generation
9432 */
9433 codeGenerationResults: CodeGenerationResults;
9434
9435 /**
9436 * the runtime template
9437 */
9438 runtimeTemplate: RuntimeTemplate;
9439
9440 /**
9441 * the module graph
9442 */
9443 moduleGraph: ModuleGraph;
9444
9445 /**
9446 * the chunk graph
9447 */
9448 chunkGraph: ChunkGraph;
9449
9450 /**
9451 * hash to be used for render call
9452 */
9453 hash: string;
9454}
9455declare interface RenderContext {
9456 /**
9457 * the chunk
9458 */
9459 chunk: Chunk;
9460
9461 /**
9462 * the dependency templates
9463 */
9464 dependencyTemplates: DependencyTemplates;
9465
9466 /**
9467 * the runtime template
9468 */
9469 runtimeTemplate: RuntimeTemplate;
9470
9471 /**
9472 * the module graph
9473 */
9474 moduleGraph: ModuleGraph;
9475
9476 /**
9477 * the chunk graph
9478 */
9479 chunkGraph: ChunkGraph;
9480
9481 /**
9482 * results of code generation
9483 */
9484 codeGenerationResults: CodeGenerationResults;
9485
9486 /**
9487 * rendering in strict context
9488 */
9489 strictMode: boolean;
9490}
9491type RenderManifestEntry =
9492 | RenderManifestEntryTemplated
9493 | RenderManifestEntryStatic;
9494declare interface RenderManifestEntryStatic {
9495 render: () => Source;
9496 filename: string;
9497 info: AssetInfo;
9498 identifier: string;
9499 hash?: string;
9500 auxiliary?: boolean;
9501}
9502declare interface RenderManifestEntryTemplated {
9503 render: () => Source;
9504 filenameTemplate: string | ((arg0: PathData, arg1?: AssetInfo) => string);
9505 pathOptions?: PathData;
9506 info?: AssetInfo;
9507 identifier: string;
9508 hash?: string;
9509 auxiliary?: boolean;
9510}
9511declare interface RenderManifestOptions {
9512 /**
9513 * the chunk used to render
9514 */
9515 chunk: Chunk;
9516 hash: string;
9517 fullHash: string;
9518 outputOptions: Output;
9519 codeGenerationResults: CodeGenerationResults;
9520 moduleTemplates: { javascript: ModuleTemplate };
9521 dependencyTemplates: DependencyTemplates;
9522 runtimeTemplate: RuntimeTemplate;
9523 moduleGraph: ModuleGraph;
9524 chunkGraph: ChunkGraph;
9525}
9526declare class ReplaceSource extends Source {
9527 constructor(source: Source, name?: string);
9528 replace(start: number, end: number, newValue: string, name?: string): void;
9529 insert(pos: number, newValue: string, name?: string): void;
9530 getName(): string;
9531 original(): string;
9532 getReplacements(): {
9533 start: number;
9534 end: number;
9535 content: string;
9536 insertIndex: number;
9537 name: string;
9538 }[];
9539}
9540declare abstract class RequestShortener {
9541 contextify: (arg0: string) => string;
9542 shorten(request?: null | string): undefined | null | string;
9543}
9544declare interface ResolveBuildDependenciesResult {
9545 /**
9546 * list of files
9547 */
9548 files: Set<string>;
9549
9550 /**
9551 * list of directories
9552 */
9553 directories: Set<string>;
9554
9555 /**
9556 * list of missing entries
9557 */
9558 missing: Set<string>;
9559
9560 /**
9561 * stored resolve results
9562 */
9563 resolveResults: Map<string, string | false>;
9564
9565 /**
9566 * dependencies of the resolving
9567 */
9568 resolveDependencies: {
9569 /**
9570 * list of files
9571 */
9572 files: Set<string>;
9573 /**
9574 * list of directories
9575 */
9576 directories: Set<string>;
9577 /**
9578 * list of missing entries
9579 */
9580 missing: Set<string>;
9581 };
9582}
9583
9584/**
9585 * Resolve context
9586 */
9587declare interface ResolveContext {
9588 contextDependencies?: WriteOnlySet<string>;
9589
9590 /**
9591 * files that was found on file system
9592 */
9593 fileDependencies?: WriteOnlySet<string>;
9594
9595 /**
9596 * dependencies that was not found on file system
9597 */
9598 missingDependencies?: WriteOnlySet<string>;
9599
9600 /**
9601 * set of hooks' calls. For instance, `resolve → parsedResolve → describedResolve`,
9602 */
9603 stack?: Set<string>;
9604
9605 /**
9606 * log function
9607 */
9608 log?: (arg0: string) => void;
9609
9610 /**
9611 * yield result, if provided plugins can return several results
9612 */
9613 yield?: (arg0: ResolveRequest) => void;
9614}
9615declare interface ResolveData {
9616 contextInfo: ModuleFactoryCreateDataContextInfo;
9617 resolveOptions?: ResolveOptionsWebpackOptions;
9618 context: string;
9619 request: string;
9620 assertions?: Record<string, any>;
9621 dependencies: ModuleDependency[];
9622 dependencyType: string;
9623 createData: Partial<NormalModuleCreateData & { settings: ModuleSettings }>;
9624 fileDependencies: LazySet<string>;
9625 missingDependencies: LazySet<string>;
9626 contextDependencies: LazySet<string>;
9627
9628 /**
9629 * allow to use the unsafe cache
9630 */
9631 cacheable: boolean;
9632}
9633declare interface ResolveOptionsTypes {
9634 alias: AliasOption[];
9635 fallback: AliasOption[];
9636 aliasFields: Set<string | string[]>;
9637 extensionAlias: ExtensionAliasOption[];
9638 cachePredicate: (arg0: ResolveRequest) => boolean;
9639 cacheWithContext: boolean;
9640
9641 /**
9642 * A list of exports field condition names.
9643 */
9644 conditionNames: Set<string>;
9645 descriptionFiles: string[];
9646 enforceExtension: boolean;
9647 exportsFields: Set<string | string[]>;
9648 importsFields: Set<string | string[]>;
9649 extensions: Set<string>;
9650 fileSystem: FileSystem;
9651 unsafeCache: false | object;
9652 symlinks: boolean;
9653 resolver?: Resolver;
9654 modules: (string | string[])[];
9655 mainFields: { name: string[]; forceRelative: boolean }[];
9656 mainFiles: Set<string>;
9657 plugins: Plugin[];
9658 pnpApi: null | PnpApiImpl;
9659 roots: Set<string>;
9660 fullySpecified: boolean;
9661 resolveToContext: boolean;
9662 restrictions: Set<string | RegExp>;
9663 preferRelative: boolean;
9664 preferAbsolute: boolean;
9665}
9666
9667/**
9668 * Options object for resolving requests.
9669 */
9670declare interface ResolveOptionsWebpackOptions {
9671 /**
9672 * Redirect module requests.
9673 */
9674 alias?:
9675 | {
9676 /**
9677 * New request.
9678 */
9679 alias: string | false | string[];
9680 /**
9681 * Request to be redirected.
9682 */
9683 name: string;
9684 /**
9685 * Redirect only exact matching request.
9686 */
9687 onlyModule?: boolean;
9688 }[]
9689 | { [index: string]: string | false | string[] };
9690
9691 /**
9692 * Fields in the description file (usually package.json) which are used to redirect requests inside the module.
9693 */
9694 aliasFields?: (string | string[])[];
9695
9696 /**
9697 * Extra resolve options per dependency category. Typical categories are "commonjs", "amd", "esm".
9698 */
9699 byDependency?: { [index: string]: ResolveOptionsWebpackOptions };
9700
9701 /**
9702 * Enable caching of successfully resolved requests (cache entries are revalidated).
9703 */
9704 cache?: boolean;
9705
9706 /**
9707 * Predicate function to decide which requests should be cached.
9708 */
9709 cachePredicate?: (request: ResolveRequest) => boolean;
9710
9711 /**
9712 * Include the context information in the cache identifier when caching.
9713 */
9714 cacheWithContext?: boolean;
9715
9716 /**
9717 * Condition names for exports field entry point.
9718 */
9719 conditionNames?: string[];
9720
9721 /**
9722 * Filenames used to find a description file (like a package.json).
9723 */
9724 descriptionFiles?: string[];
9725
9726 /**
9727 * Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension).
9728 */
9729 enforceExtension?: boolean;
9730
9731 /**
9732 * Field names from the description file (usually package.json) which are used to provide entry points of a package.
9733 */
9734 exportsFields?: string[];
9735
9736 /**
9737 * An object which maps extension to extension aliases.
9738 */
9739 extensionAlias?: { [index: string]: string | string[] };
9740
9741 /**
9742 * Extensions added to the request when trying to find the file.
9743 */
9744 extensions?: string[];
9745
9746 /**
9747 * Redirect module requests when normal resolving fails.
9748 */
9749 fallback?:
9750 | {
9751 /**
9752 * New request.
9753 */
9754 alias: string | false | string[];
9755 /**
9756 * Request to be redirected.
9757 */
9758 name: string;
9759 /**
9760 * Redirect only exact matching request.
9761 */
9762 onlyModule?: boolean;
9763 }[]
9764 | { [index: string]: string | false | string[] };
9765
9766 /**
9767 * Filesystem for the resolver.
9768 */
9769 fileSystem?: InputFileSystem;
9770
9771 /**
9772 * 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).
9773 */
9774 fullySpecified?: boolean;
9775
9776 /**
9777 * 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).
9778 */
9779 importsFields?: string[];
9780
9781 /**
9782 * Field names from the description file (package.json) which are used to find the default entry point.
9783 */
9784 mainFields?: (string | string[])[];
9785
9786 /**
9787 * Filenames used to find the default entry point if there is no description file or main field.
9788 */
9789 mainFiles?: string[];
9790
9791 /**
9792 * Folder names or directory paths where to find modules.
9793 */
9794 modules?: string[];
9795
9796 /**
9797 * Plugins for the resolver.
9798 */
9799 plugins?: (ResolvePluginInstance | "...")[];
9800
9801 /**
9802 * Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.
9803 */
9804 preferAbsolute?: boolean;
9805
9806 /**
9807 * Prefer to resolve module requests as relative request and fallback to resolving as module.
9808 */
9809 preferRelative?: boolean;
9810
9811 /**
9812 * Custom resolver.
9813 */
9814 resolver?: Resolver;
9815
9816 /**
9817 * 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.
9818 */
9819 restrictions?: (string | RegExp)[];
9820
9821 /**
9822 * A list of directories in which requests that are server-relative URLs (starting with '/') are resolved.
9823 */
9824 roots?: string[];
9825
9826 /**
9827 * Enable resolving symlinks to the original location.
9828 */
9829 symlinks?: boolean;
9830
9831 /**
9832 * Enable caching of successfully resolved requests (cache entries are not revalidated).
9833 */
9834 unsafeCache?: boolean | { [index: string]: any };
9835
9836 /**
9837 * Use synchronous filesystem calls for the resolver.
9838 */
9839 useSyncFileSystemCalls?: boolean;
9840}
9841type ResolveOptionsWithDependencyType = ResolveOptionsWebpackOptions & {
9842 dependencyType?: string;
9843 resolveToContext?: boolean;
9844};
9845
9846/**
9847 * Plugin instance.
9848 */
9849declare interface ResolvePluginInstance {
9850 [index: string]: any;
9851
9852 /**
9853 * The run point of the plugin, required method.
9854 */
9855 apply: (resolver: Resolver) => void;
9856}
9857type ResolveRequest = BaseResolveRequest & Partial<ParsedIdentifier>;
9858declare interface ResolvedContextFileSystemInfoEntry {
9859 safeTime: number;
9860 timestampHash?: string;
9861}
9862declare interface ResolvedContextTimestampAndHash {
9863 safeTime: number;
9864 timestampHash?: string;
9865 hash: string;
9866}
9867declare abstract class Resolver {
9868 fileSystem: FileSystem;
9869 options: ResolveOptionsTypes;
9870 hooks: {
9871 resolveStep: SyncHook<
9872 [
9873 AsyncSeriesBailHook<
9874 [ResolveRequest, ResolveContext],
9875 null | ResolveRequest
9876 >,
9877 ResolveRequest
9878 ]
9879 >;
9880 noResolve: SyncHook<[ResolveRequest, Error]>;
9881 resolve: AsyncSeriesBailHook<
9882 [ResolveRequest, ResolveContext],
9883 null | ResolveRequest
9884 >;
9885 result: AsyncSeriesHook<[ResolveRequest, ResolveContext]>;
9886 };
9887 ensureHook(
9888 name:
9889 | string
9890 | AsyncSeriesBailHook<
9891 [ResolveRequest, ResolveContext],
9892 null | ResolveRequest
9893 >
9894 ): AsyncSeriesBailHook<
9895 [ResolveRequest, ResolveContext],
9896 null | ResolveRequest
9897 >;
9898 getHook(
9899 name:
9900 | string
9901 | AsyncSeriesBailHook<
9902 [ResolveRequest, ResolveContext],
9903 null | ResolveRequest
9904 >
9905 ): AsyncSeriesBailHook<
9906 [ResolveRequest, ResolveContext],
9907 null | ResolveRequest
9908 >;
9909 resolveSync(context: object, path: string, request: string): string | false;
9910 resolve(
9911 context: object,
9912 path: string,
9913 request: string,
9914 resolveContext: ResolveContext,
9915 callback: (
9916 arg0: null | Error,
9917 arg1?: string | false,
9918 arg2?: ResolveRequest
9919 ) => void
9920 ): void;
9921 doResolve(
9922 hook?: any,
9923 request?: any,
9924 message?: any,
9925 resolveContext?: any,
9926 callback?: any
9927 ): any;
9928 parse(identifier: string): ParsedIdentifier;
9929 isModule(path?: any): boolean;
9930 isPrivate(path?: any): boolean;
9931 isDirectory(path: string): boolean;
9932 join(path?: any, request?: any): string;
9933 normalize(path?: any): string;
9934}
9935declare interface ResolverCache {
9936 direct: WeakMap<Object, ResolverWithOptions>;
9937 stringified: Map<string, ResolverWithOptions>;
9938}
9939declare abstract class ResolverFactory {
9940 hooks: Readonly<{
9941 resolveOptions: HookMap<
9942 SyncWaterfallHook<[ResolveOptionsWithDependencyType]>
9943 >;
9944 resolver: HookMap<
9945 SyncHook<[Resolver, UserResolveOptions, ResolveOptionsWithDependencyType]>
9946 >;
9947 }>;
9948 cache: Map<string, ResolverCache>;
9949 get(
9950 type: string,
9951 resolveOptions?: ResolveOptionsWithDependencyType
9952 ): ResolverWithOptions;
9953}
9954type ResolverWithOptions = Resolver & WithOptions;
9955
9956declare interface ResourceDataWithData {
9957 resource: string;
9958 path: string;
9959 query: string;
9960 fragment: string;
9961 context?: string;
9962 data: Record<string, any>;
9963}
9964type Rule = string | RegExp;
9965declare interface RuleSet {
9966 /**
9967 * map of references in the rule set (may grow over time)
9968 */
9969 references: Map<string, any>;
9970
9971 /**
9972 * execute the rule set
9973 */
9974 exec: (arg0: object) => Effect[];
9975}
9976type RuleSetCondition =
9977 | string
9978 | RegExp
9979 | ((value: string) => boolean)
9980 | RuleSetLogicalConditions
9981 | RuleSetCondition[];
9982type RuleSetConditionAbsolute =
9983 | string
9984 | RegExp
9985 | ((value: string) => boolean)
9986 | RuleSetLogicalConditionsAbsolute
9987 | RuleSetConditionAbsolute[];
9988type RuleSetConditionOrConditions =
9989 | string
9990 | RegExp
9991 | ((value: string) => boolean)
9992 | RuleSetLogicalConditions
9993 | RuleSetCondition[];
9994
9995/**
9996 * Logic operators used in a condition matcher.
9997 */
9998declare interface RuleSetLogicalConditions {
9999 /**
10000 * Logical AND.
10001 */
10002 and?: RuleSetCondition[];
10003
10004 /**
10005 * Logical NOT.
10006 */
10007 not?:
10008 | string
10009 | RegExp
10010 | ((value: string) => boolean)
10011 | RuleSetLogicalConditions
10012 | RuleSetCondition[];
10013
10014 /**
10015 * Logical OR.
10016 */
10017 or?: RuleSetCondition[];
10018}
10019
10020/**
10021 * Logic operators used in a condition matcher.
10022 */
10023declare interface RuleSetLogicalConditionsAbsolute {
10024 /**
10025 * Logical AND.
10026 */
10027 and?: RuleSetConditionAbsolute[];
10028
10029 /**
10030 * Logical NOT.
10031 */
10032 not?:
10033 | string
10034 | RegExp
10035 | ((value: string) => boolean)
10036 | RuleSetLogicalConditionsAbsolute
10037 | RuleSetConditionAbsolute[];
10038
10039 /**
10040 * Logical OR.
10041 */
10042 or?: RuleSetConditionAbsolute[];
10043}
10044
10045/**
10046 * A rule description with conditions and effects for modules.
10047 */
10048declare interface RuleSetRule {
10049 /**
10050 * Match on import assertions of the dependency.
10051 */
10052 assert?: { [index: string]: RuleSetConditionOrConditions };
10053
10054 /**
10055 * Match the child compiler name.
10056 */
10057 compiler?:
10058 | string
10059 | RegExp
10060 | ((value: string) => boolean)
10061 | RuleSetLogicalConditions
10062 | RuleSetCondition[];
10063
10064 /**
10065 * Match dependency type.
10066 */
10067 dependency?:
10068 | string
10069 | RegExp
10070 | ((value: string) => boolean)
10071 | RuleSetLogicalConditions
10072 | RuleSetCondition[];
10073
10074 /**
10075 * Match values of properties in the description file (usually package.json).
10076 */
10077 descriptionData?: { [index: string]: RuleSetConditionOrConditions };
10078
10079 /**
10080 * Enforce this rule as pre or post step.
10081 */
10082 enforce?: "pre" | "post";
10083
10084 /**
10085 * Shortcut for resource.exclude.
10086 */
10087 exclude?:
10088 | string
10089 | RegExp
10090 | ((value: string) => boolean)
10091 | RuleSetLogicalConditionsAbsolute
10092 | RuleSetConditionAbsolute[];
10093
10094 /**
10095 * The options for the module generator.
10096 */
10097 generator?: { [index: string]: any };
10098
10099 /**
10100 * Shortcut for resource.include.
10101 */
10102 include?:
10103 | string
10104 | RegExp
10105 | ((value: string) => boolean)
10106 | RuleSetLogicalConditionsAbsolute
10107 | RuleSetConditionAbsolute[];
10108
10109 /**
10110 * Match the issuer of the module (The module pointing to this module).
10111 */
10112 issuer?:
10113 | string
10114 | RegExp
10115 | ((value: string) => boolean)
10116 | RuleSetLogicalConditionsAbsolute
10117 | RuleSetConditionAbsolute[];
10118
10119 /**
10120 * Match layer of the issuer of this module (The module pointing to this module).
10121 */
10122 issuerLayer?:
10123 | string
10124 | RegExp
10125 | ((value: string) => boolean)
10126 | RuleSetLogicalConditions
10127 | RuleSetCondition[];
10128
10129 /**
10130 * Specifies the layer in which the module should be placed in.
10131 */
10132 layer?: string;
10133
10134 /**
10135 * Shortcut for use.loader.
10136 */
10137 loader?: string;
10138
10139 /**
10140 * Match module mimetype when load from Data URI.
10141 */
10142 mimetype?:
10143 | string
10144 | RegExp
10145 | ((value: string) => boolean)
10146 | RuleSetLogicalConditions
10147 | RuleSetCondition[];
10148
10149 /**
10150 * Only execute the first matching rule in this array.
10151 */
10152 oneOf?: RuleSetRule[];
10153
10154 /**
10155 * Shortcut for use.options.
10156 */
10157 options?: string | { [index: string]: any };
10158
10159 /**
10160 * Options for parsing.
10161 */
10162 parser?: { [index: string]: any };
10163
10164 /**
10165 * Match the real resource path of the module.
10166 */
10167 realResource?:
10168 | string
10169 | RegExp
10170 | ((value: string) => boolean)
10171 | RuleSetLogicalConditionsAbsolute
10172 | RuleSetConditionAbsolute[];
10173
10174 /**
10175 * Options for the resolver.
10176 */
10177 resolve?: ResolveOptionsWebpackOptions;
10178
10179 /**
10180 * Match the resource path of the module.
10181 */
10182 resource?:
10183 | string
10184 | RegExp
10185 | ((value: string) => boolean)
10186 | RuleSetLogicalConditionsAbsolute
10187 | RuleSetConditionAbsolute[];
10188
10189 /**
10190 * Match the resource fragment of the module.
10191 */
10192 resourceFragment?:
10193 | string
10194 | RegExp
10195 | ((value: string) => boolean)
10196 | RuleSetLogicalConditions
10197 | RuleSetCondition[];
10198
10199 /**
10200 * Match the resource query of the module.
10201 */
10202 resourceQuery?:
10203 | string
10204 | RegExp
10205 | ((value: string) => boolean)
10206 | RuleSetLogicalConditions
10207 | RuleSetCondition[];
10208
10209 /**
10210 * Match and execute these rules when this rule is matched.
10211 */
10212 rules?: RuleSetRule[];
10213
10214 /**
10215 * Match module scheme.
10216 */
10217 scheme?:
10218 | string
10219 | RegExp
10220 | ((value: string) => boolean)
10221 | RuleSetLogicalConditions
10222 | RuleSetCondition[];
10223
10224 /**
10225 * Flags a module as with or without side effects.
10226 */
10227 sideEffects?: boolean;
10228
10229 /**
10230 * Shortcut for resource.test.
10231 */
10232 test?:
10233 | string
10234 | RegExp
10235 | ((value: string) => boolean)
10236 | RuleSetLogicalConditionsAbsolute
10237 | RuleSetConditionAbsolute[];
10238
10239 /**
10240 * Module type to use for the module.
10241 */
10242 type?: string;
10243
10244 /**
10245 * Modifiers applied to the module when rule is matched.
10246 */
10247 use?:
10248 | string
10249 | RuleSetUseItem[]
10250 | ((data: {
10251 resource: string;
10252 realResource: string;
10253 resourceQuery: string;
10254 issuer: string;
10255 compiler: string;
10256 }) => RuleSetUseItem[])
10257 | {
10258 /**
10259 * Unique loader options identifier.
10260 */
10261 ident?: string;
10262 /**
10263 * Loader name.
10264 */
10265 loader?: string;
10266 /**
10267 * Loader options.
10268 */
10269 options?: string | { [index: string]: any };
10270 }
10271 | ((data: object) =>
10272 | string
10273 | {
10274 /**
10275 * Unique loader options identifier.
10276 */
10277 ident?: string;
10278 /**
10279 * Loader name.
10280 */
10281 loader?: string;
10282 /**
10283 * Loader options.
10284 */
10285 options?: string | { [index: string]: any };
10286 }
10287 | __TypeWebpackOptions
10288 | RuleSetUseItem[]);
10289}
10290type RuleSetUse =
10291 | string
10292 | RuleSetUseItem[]
10293 | ((data: {
10294 resource: string;
10295 realResource: string;
10296 resourceQuery: string;
10297 issuer: string;
10298 compiler: string;
10299 }) => RuleSetUseItem[])
10300 | {
10301 /**
10302 * Unique loader options identifier.
10303 */
10304 ident?: string;
10305 /**
10306 * Loader name.
10307 */
10308 loader?: string;
10309 /**
10310 * Loader options.
10311 */
10312 options?: string | { [index: string]: any };
10313 }
10314 | __TypeWebpackOptions;
10315type RuleSetUseItem =
10316 | string
10317 | {
10318 /**
10319 * Unique loader options identifier.
10320 */
10321 ident?: string;
10322 /**
10323 * Loader name.
10324 */
10325 loader?: string;
10326 /**
10327 * Loader options.
10328 */
10329 options?: string | { [index: string]: any };
10330 }
10331 | __TypeWebpackOptions;
10332declare class RuntimeChunkPlugin {
10333 constructor(options?: any);
10334 options: any;
10335
10336 /**
10337 * Apply the plugin
10338 */
10339 apply(compiler: Compiler): void;
10340}
10341type RuntimeCondition = undefined | string | boolean | SortableSet<string>;
10342declare class RuntimeModule extends Module {
10343 constructor(name: string, stage?: number);
10344 name: string;
10345 stage: number;
10346 compilation: Compilation;
10347 chunk: Chunk;
10348 chunkGraph: ChunkGraph;
10349 fullHash: boolean;
10350 dependentHash: boolean;
10351 attach(compilation: Compilation, chunk: Chunk, chunkGraph?: ChunkGraph): void;
10352 generate(): string;
10353 getGeneratedCode(): string;
10354 shouldIsolate(): boolean;
10355
10356 /**
10357 * Runtime modules without any dependencies to other runtime modules
10358 */
10359 static STAGE_NORMAL: number;
10360
10361 /**
10362 * Runtime modules with simple dependencies on other runtime modules
10363 */
10364 static STAGE_BASIC: number;
10365
10366 /**
10367 * Runtime modules which attach to handlers of other runtime modules
10368 */
10369 static STAGE_ATTACH: number;
10370
10371 /**
10372 * Runtime modules which trigger actions on bootstrap
10373 */
10374 static STAGE_TRIGGER: number;
10375}
10376declare interface RuntimeRequirementsContext {
10377 /**
10378 * the chunk graph
10379 */
10380 chunkGraph: ChunkGraph;
10381
10382 /**
10383 * the code generation results
10384 */
10385 codeGenerationResults: CodeGenerationResults;
10386}
10387type RuntimeSpec = undefined | string | SortableSet<string>;
10388declare class RuntimeSpecMap<T> {
10389 constructor(clone?: RuntimeSpecMap<T>);
10390 get(runtime: RuntimeSpec): T;
10391 has(runtime: RuntimeSpec): boolean;
10392 set(runtime?: any, value?: any): void;
10393 provide(runtime?: any, computer?: any): any;
10394 delete(runtime?: any): void;
10395 update(runtime?: any, fn?: any): void;
10396 keys(): RuntimeSpec[];
10397 values(): IterableIterator<T>;
10398 get size(): number;
10399}
10400declare class RuntimeSpecSet {
10401 constructor(iterable?: any);
10402 add(runtime?: any): void;
10403 has(runtime?: any): boolean;
10404 get size(): number;
10405 [Symbol.iterator](): IterableIterator<RuntimeSpec>;
10406}
10407declare abstract class RuntimeTemplate {
10408 compilation: Compilation;
10409 outputOptions: OutputNormalized;
10410 requestShortener: RequestShortener;
10411 globalObject: string;
10412 contentHashReplacement: string;
10413 isIIFE(): undefined | boolean;
10414 isModule(): undefined | boolean;
10415 supportsConst(): undefined | boolean;
10416 supportsArrowFunction(): undefined | boolean;
10417 supportsOptionalChaining(): undefined | boolean;
10418 supportsForOf(): undefined | boolean;
10419 supportsDestructuring(): undefined | boolean;
10420 supportsBigIntLiteral(): undefined | boolean;
10421 supportsDynamicImport(): undefined | boolean;
10422 supportsEcmaScriptModuleSyntax(): undefined | boolean;
10423 supportTemplateLiteral(): undefined | boolean;
10424 returningFunction(returnValue?: any, args?: string): string;
10425 basicFunction(args?: any, body?: any): string;
10426 concatenation(...args: (string | { expr: string })[]): string;
10427 expressionFunction(expression?: any, args?: string): string;
10428 emptyFunction(): "x => {}" | "function() {}";
10429 destructureArray(items?: any, value?: any): string;
10430 destructureObject(items?: any, value?: any): string;
10431 iife(args?: any, body?: any): string;
10432 forEach(variable?: any, array?: any, body?: any): string;
10433
10434 /**
10435 * Add a comment
10436 */
10437 comment(__0: {
10438 /**
10439 * request string used originally
10440 */
10441 request?: string;
10442 /**
10443 * name of the chunk referenced
10444 */
10445 chunkName?: string;
10446 /**
10447 * reason information of the chunk
10448 */
10449 chunkReason?: string;
10450 /**
10451 * additional message
10452 */
10453 message?: string;
10454 /**
10455 * name of the export
10456 */
10457 exportName?: string;
10458 }): string;
10459 throwMissingModuleErrorBlock(__0: {
10460 /**
10461 * request string used originally
10462 */
10463 request?: string;
10464 }): string;
10465 throwMissingModuleErrorFunction(__0: {
10466 /**
10467 * request string used originally
10468 */
10469 request?: string;
10470 }): string;
10471 missingModule(__0: {
10472 /**
10473 * request string used originally
10474 */
10475 request?: string;
10476 }): string;
10477 missingModuleStatement(__0: {
10478 /**
10479 * request string used originally
10480 */
10481 request?: string;
10482 }): string;
10483 missingModulePromise(__0: {
10484 /**
10485 * request string used originally
10486 */
10487 request?: string;
10488 }): string;
10489 weakError(__0: {
10490 /**
10491 * the chunk graph
10492 */
10493 chunkGraph: ChunkGraph;
10494 /**
10495 * the module
10496 */
10497 module: Module;
10498 /**
10499 * the request that should be printed as comment
10500 */
10501 request: string;
10502 /**
10503 * expression to use as id expression
10504 */
10505 idExpr?: string;
10506 /**
10507 * which kind of code should be returned
10508 */
10509 type: "promise" | "expression" | "statements";
10510 }): string;
10511 moduleId(__0: {
10512 /**
10513 * the module
10514 */
10515 module: Module;
10516 /**
10517 * the chunk graph
10518 */
10519 chunkGraph: ChunkGraph;
10520 /**
10521 * the request that should be printed as comment
10522 */
10523 request: string;
10524 /**
10525 * if the dependency is weak (will create a nice error message)
10526 */
10527 weak?: boolean;
10528 }): string;
10529 moduleRaw(__0: {
10530 /**
10531 * the module
10532 */
10533 module: Module;
10534 /**
10535 * the chunk graph
10536 */
10537 chunkGraph: ChunkGraph;
10538 /**
10539 * the request that should be printed as comment
10540 */
10541 request: string;
10542 /**
10543 * if the dependency is weak (will create a nice error message)
10544 */
10545 weak?: boolean;
10546 /**
10547 * if set, will be filled with runtime requirements
10548 */
10549 runtimeRequirements: Set<string>;
10550 }): string;
10551 moduleExports(__0: {
10552 /**
10553 * the module
10554 */
10555 module: Module;
10556 /**
10557 * the chunk graph
10558 */
10559 chunkGraph: ChunkGraph;
10560 /**
10561 * the request that should be printed as comment
10562 */
10563 request: string;
10564 /**
10565 * if the dependency is weak (will create a nice error message)
10566 */
10567 weak?: boolean;
10568 /**
10569 * if set, will be filled with runtime requirements
10570 */
10571 runtimeRequirements: Set<string>;
10572 }): string;
10573 moduleNamespace(__0: {
10574 /**
10575 * the module
10576 */
10577 module: Module;
10578 /**
10579 * the chunk graph
10580 */
10581 chunkGraph: ChunkGraph;
10582 /**
10583 * the request that should be printed as comment
10584 */
10585 request: string;
10586 /**
10587 * if the current module is in strict esm mode
10588 */
10589 strict?: boolean;
10590 /**
10591 * if the dependency is weak (will create a nice error message)
10592 */
10593 weak?: boolean;
10594 /**
10595 * if set, will be filled with runtime requirements
10596 */
10597 runtimeRequirements: Set<string>;
10598 }): string;
10599 moduleNamespacePromise(__0: {
10600 /**
10601 * the chunk graph
10602 */
10603 chunkGraph: ChunkGraph;
10604 /**
10605 * the current dependencies block
10606 */
10607 block?: AsyncDependenciesBlock;
10608 /**
10609 * the module
10610 */
10611 module: Module;
10612 /**
10613 * the request that should be printed as comment
10614 */
10615 request: string;
10616 /**
10617 * a message for the comment
10618 */
10619 message: string;
10620 /**
10621 * if the current module is in strict esm mode
10622 */
10623 strict?: boolean;
10624 /**
10625 * if the dependency is weak (will create a nice error message)
10626 */
10627 weak?: boolean;
10628 /**
10629 * if set, will be filled with runtime requirements
10630 */
10631 runtimeRequirements: Set<string>;
10632 }): string;
10633 runtimeConditionExpression(__0: {
10634 /**
10635 * the chunk graph
10636 */
10637 chunkGraph: ChunkGraph;
10638 /**
10639 * runtime for which this code will be generated
10640 */
10641 runtime?: RuntimeSpec;
10642 /**
10643 * only execute the statement in some runtimes
10644 */
10645 runtimeCondition?: string | boolean | SortableSet<string>;
10646 /**
10647 * if set, will be filled with runtime requirements
10648 */
10649 runtimeRequirements: Set<string>;
10650 }): string;
10651 importStatement(__0: {
10652 /**
10653 * whether a new variable should be created or the existing one updated
10654 */
10655 update?: boolean;
10656 /**
10657 * the module
10658 */
10659 module: Module;
10660 /**
10661 * the chunk graph
10662 */
10663 chunkGraph: ChunkGraph;
10664 /**
10665 * the request that should be printed as comment
10666 */
10667 request: string;
10668 /**
10669 * name of the import variable
10670 */
10671 importVar: string;
10672 /**
10673 * module in which the statement is emitted
10674 */
10675 originModule: Module;
10676 /**
10677 * true, if this is a weak dependency
10678 */
10679 weak?: boolean;
10680 /**
10681 * if set, will be filled with runtime requirements
10682 */
10683 runtimeRequirements: Set<string>;
10684 }): [string, string];
10685 exportFromImport(__0: {
10686 /**
10687 * the module graph
10688 */
10689 moduleGraph: ModuleGraph;
10690 /**
10691 * the module
10692 */
10693 module: Module;
10694 /**
10695 * the request
10696 */
10697 request: string;
10698 /**
10699 * the export name
10700 */
10701 exportName: string | string[];
10702 /**
10703 * the origin module
10704 */
10705 originModule: Module;
10706 /**
10707 * true, if location is safe for ASI, a bracket can be emitted
10708 */
10709 asiSafe?: boolean;
10710 /**
10711 * true, if expression will be called
10712 */
10713 isCall: boolean;
10714 /**
10715 * when false, call context will not be preserved
10716 */
10717 callContext: boolean;
10718 /**
10719 * when true and accessing the default exports, interop code will be generated
10720 */
10721 defaultInterop: boolean;
10722 /**
10723 * the identifier name of the import variable
10724 */
10725 importVar: string;
10726 /**
10727 * init fragments will be added here
10728 */
10729 initFragments: InitFragment<any>[];
10730 /**
10731 * runtime for which this code will be generated
10732 */
10733 runtime: RuntimeSpec;
10734 /**
10735 * if set, will be filled with runtime requirements
10736 */
10737 runtimeRequirements: Set<string>;
10738 }): string;
10739 blockPromise(__0: {
10740 /**
10741 * the async block
10742 */
10743 block: AsyncDependenciesBlock;
10744 /**
10745 * the message
10746 */
10747 message: string;
10748 /**
10749 * the chunk graph
10750 */
10751 chunkGraph: ChunkGraph;
10752 /**
10753 * if set, will be filled with runtime requirements
10754 */
10755 runtimeRequirements: Set<string>;
10756 }): string;
10757 asyncModuleFactory(__0: {
10758 /**
10759 * the async block
10760 */
10761 block: AsyncDependenciesBlock;
10762 /**
10763 * the chunk graph
10764 */
10765 chunkGraph: ChunkGraph;
10766 /**
10767 * if set, will be filled with runtime requirements
10768 */
10769 runtimeRequirements: Set<string>;
10770 /**
10771 * request string used originally
10772 */
10773 request?: string;
10774 }): string;
10775 syncModuleFactory(__0: {
10776 /**
10777 * the dependency
10778 */
10779 dependency: Dependency;
10780 /**
10781 * the chunk graph
10782 */
10783 chunkGraph: ChunkGraph;
10784 /**
10785 * if set, will be filled with runtime requirements
10786 */
10787 runtimeRequirements: Set<string>;
10788 /**
10789 * request string used originally
10790 */
10791 request?: string;
10792 }): string;
10793 defineEsModuleFlagStatement(__0: {
10794 /**
10795 * the name of the exports object
10796 */
10797 exportsArgument: string;
10798 /**
10799 * if set, will be filled with runtime requirements
10800 */
10801 runtimeRequirements: Set<string>;
10802 }): string;
10803 assetUrl(__0: {
10804 /**
10805 * the module
10806 */
10807 module: Module;
10808 /**
10809 * the public path
10810 */
10811 publicPath: string;
10812 /**
10813 * runtime
10814 */
10815 runtime?: RuntimeSpec;
10816 /**
10817 * the code generation results
10818 */
10819 codeGenerationResults: CodeGenerationResults;
10820 }): string;
10821}
10822declare abstract class RuntimeValue {
10823 fn: (arg0: {
10824 module: NormalModule;
10825 key: string;
10826 readonly version?: string;
10827 }) => CodeValuePrimitive;
10828 options: true | RuntimeValueOptions;
10829 get fileDependencies(): true | string[];
10830 exec(
10831 parser: JavascriptParser,
10832 valueCacheVersions: Map<string, string | Set<string>>,
10833 key: string
10834 ): CodeValuePrimitive;
10835 getCacheVersion(): undefined | string;
10836}
10837declare interface RuntimeValueOptions {
10838 fileDependencies?: string[];
10839 contextDependencies?: string[];
10840 missingDependencies?: string[];
10841 buildDependencies?: string[];
10842 version?: string | (() => string);
10843}
10844declare interface ScopeInfo {
10845 definitions: StackedMap<string, ScopeInfo | VariableInfo>;
10846 topLevelScope: boolean | "arrow";
10847 inShorthand: boolean;
10848 isStrict: boolean;
10849 isAsmJs: boolean;
10850 inTry: boolean;
10851}
10852declare interface Selector<A, B> {
10853 (input: A): B;
10854}
10855declare abstract class Serializer {
10856 serializeMiddlewares: any;
10857 deserializeMiddlewares: any;
10858 context: any;
10859 serialize(obj?: any, context?: any): any;
10860 deserialize(value?: any, context?: any): any;
10861}
10862type ServerOptionsHttps = SecureContextOptions &
10863 TlsOptions &
10864 ServerOptionsImport;
10865declare class SharePlugin {
10866 constructor(options: SharePluginOptions);
10867
10868 /**
10869 * Apply the plugin
10870 */
10871 apply(compiler: Compiler): void;
10872}
10873
10874/**
10875 * Options for shared modules.
10876 */
10877declare interface SharePluginOptions {
10878 /**
10879 * Share scope name used for all shared modules (defaults to 'default').
10880 */
10881 shareScope?: string;
10882
10883 /**
10884 * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.
10885 */
10886 shared: Shared;
10887}
10888type Shared = (string | SharedObject)[] | SharedObject;
10889
10890/**
10891 * Advanced configuration for modules that should be shared in the share scope.
10892 */
10893declare interface SharedConfig {
10894 /**
10895 * 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.
10896 */
10897 eager?: boolean;
10898
10899 /**
10900 * 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.
10901 */
10902 import?: string | false;
10903
10904 /**
10905 * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.
10906 */
10907 packageName?: string;
10908
10909 /**
10910 * Version requirement from module in share scope.
10911 */
10912 requiredVersion?: string | false;
10913
10914 /**
10915 * Module is looked up under this key from the share scope.
10916 */
10917 shareKey?: string;
10918
10919 /**
10920 * Share scope name.
10921 */
10922 shareScope?: string;
10923
10924 /**
10925 * Allow only a single version of the shared module in share scope (disabled by default).
10926 */
10927 singleton?: boolean;
10928
10929 /**
10930 * 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).
10931 */
10932 strictVersion?: boolean;
10933
10934 /**
10935 * Version of the provided module. Will replace lower matching versions, but not higher.
10936 */
10937 version?: string | false;
10938}
10939
10940/**
10941 * 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.
10942 */
10943declare interface SharedObject {
10944 [index: string]: string | SharedConfig;
10945}
10946declare class SideEffectsFlagPlugin {
10947 constructor(analyseSource?: boolean);
10948
10949 /**
10950 * Apply the plugin
10951 */
10952 apply(compiler: Compiler): void;
10953 static moduleHasSideEffects(
10954 moduleName?: any,
10955 flagValue?: any,
10956 cache?: any
10957 ): any;
10958}
10959declare class SizeOnlySource extends Source {
10960 constructor(size: number);
10961}
10962declare abstract class Snapshot {
10963 startTime?: number;
10964 fileTimestamps?: Map<string, null | FileSystemInfoEntry>;
10965 fileHashes?: Map<string, null | string>;
10966 fileTshs?: Map<string, null | string | TimestampAndHash>;
10967 contextTimestamps?: Map<string, null | ResolvedContextFileSystemInfoEntry>;
10968 contextHashes?: Map<string, null | string>;
10969 contextTshs?: Map<string, null | ResolvedContextTimestampAndHash>;
10970 missingExistence?: Map<string, boolean>;
10971 managedItemInfo?: Map<string, string>;
10972 managedFiles?: Set<string>;
10973 managedContexts?: Set<string>;
10974 managedMissing?: Set<string>;
10975 children?: Set<Snapshot>;
10976 hasStartTime(): boolean;
10977 setStartTime(value?: any): void;
10978 setMergedStartTime(value?: any, snapshot?: any): void;
10979 hasFileTimestamps(): boolean;
10980 setFileTimestamps(value?: any): void;
10981 hasFileHashes(): boolean;
10982 setFileHashes(value?: any): void;
10983 hasFileTshs(): boolean;
10984 setFileTshs(value?: any): void;
10985 hasContextTimestamps(): boolean;
10986 setContextTimestamps(value?: any): void;
10987 hasContextHashes(): boolean;
10988 setContextHashes(value?: any): void;
10989 hasContextTshs(): boolean;
10990 setContextTshs(value?: any): void;
10991 hasMissingExistence(): boolean;
10992 setMissingExistence(value?: any): void;
10993 hasManagedItemInfo(): boolean;
10994 setManagedItemInfo(value?: any): void;
10995 hasManagedFiles(): boolean;
10996 setManagedFiles(value?: any): void;
10997 hasManagedContexts(): boolean;
10998 setManagedContexts(value?: any): void;
10999 hasManagedMissing(): boolean;
11000 setManagedMissing(value?: any): void;
11001 hasChildren(): boolean;
11002 setChildren(value?: any): void;
11003 addChild(child?: any): void;
11004 serialize(__0: { write: any }): void;
11005 deserialize(__0: { read: any }): void;
11006 getFileIterable(): Iterable<string>;
11007 getContextIterable(): Iterable<string>;
11008 getMissingIterable(): Iterable<string>;
11009}
11010
11011/**
11012 * Options affecting how file system snapshots are created and validated.
11013 */
11014declare interface SnapshotOptions {
11015 /**
11016 * Options for snapshotting build dependencies to determine if the whole cache need to be invalidated.
11017 */
11018 buildDependencies?: {
11019 /**
11020 * Use hashes of the content of the files/directories to determine invalidation.
11021 */
11022 hash?: boolean;
11023 /**
11024 * Use timestamps of the files/directories to determine invalidation.
11025 */
11026 timestamp?: boolean;
11027 };
11028
11029 /**
11030 * List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.
11031 */
11032 immutablePaths?: (string | RegExp)[];
11033
11034 /**
11035 * List of paths that are managed by a package manager and can be trusted to not be modified otherwise.
11036 */
11037 managedPaths?: (string | RegExp)[];
11038
11039 /**
11040 * Options for snapshotting dependencies of modules to determine if they need to be built again.
11041 */
11042 module?: {
11043 /**
11044 * Use hashes of the content of the files/directories to determine invalidation.
11045 */
11046 hash?: boolean;
11047 /**
11048 * Use timestamps of the files/directories to determine invalidation.
11049 */
11050 timestamp?: boolean;
11051 };
11052
11053 /**
11054 * Options for snapshotting dependencies of request resolving to determine if requests need to be re-resolved.
11055 */
11056 resolve?: {
11057 /**
11058 * Use hashes of the content of the files/directories to determine invalidation.
11059 */
11060 hash?: boolean;
11061 /**
11062 * Use timestamps of the files/directories to determine invalidation.
11063 */
11064 timestamp?: boolean;
11065 };
11066
11067 /**
11068 * Options for snapshotting the resolving of build dependencies to determine if the build dependencies need to be re-resolved.
11069 */
11070 resolveBuildDependencies?: {
11071 /**
11072 * Use hashes of the content of the files/directories to determine invalidation.
11073 */
11074 hash?: boolean;
11075 /**
11076 * Use timestamps of the files/directories to determine invalidation.
11077 */
11078 timestamp?: boolean;
11079 };
11080}
11081declare abstract class SortableSet<T> extends Set<T> {
11082 /**
11083 * Sort with a comparer function
11084 */
11085 sortWith(sortFn: (arg0: T, arg1: T) => number): void;
11086 sort(): SortableSet<T>;
11087
11088 /**
11089 * Get data from cache
11090 */
11091 getFromCache<R>(fn: (arg0: SortableSet<T>) => R): R;
11092
11093 /**
11094 * Get data from cache (ignoring sorting)
11095 */
11096 getFromUnorderedCache<R>(fn: (arg0: SortableSet<T>) => R): R;
11097 toJSON(): T[];
11098
11099 /**
11100 * Iterates over values in the set.
11101 */
11102 [Symbol.iterator](): IterableIterator<T>;
11103}
11104declare class Source {
11105 constructor();
11106 size(): number;
11107 map(options?: MapOptions): Object;
11108 sourceAndMap(options?: MapOptions): { source: string | Buffer; map: Object };
11109 updateHash(hash: Hash): void;
11110 source(): string | Buffer;
11111 buffer(): Buffer;
11112}
11113declare interface SourceLike {
11114 source(): string | Buffer;
11115}
11116declare interface SourceMap {
11117 version: number;
11118 sources: string[];
11119 mappings: string;
11120 file?: string;
11121 sourceRoot?: string;
11122 sourcesContent?: string[];
11123 names?: string[];
11124}
11125declare class SourceMapDevToolPlugin {
11126 constructor(options?: SourceMapDevToolPluginOptions);
11127 sourceMapFilename: string | false;
11128 sourceMappingURLComment: string | false;
11129 moduleFilenameTemplate: string | Function;
11130 fallbackModuleFilenameTemplate: string | Function;
11131 namespace: string;
11132 options: SourceMapDevToolPluginOptions;
11133
11134 /**
11135 * Apply the plugin
11136 */
11137 apply(compiler: Compiler): void;
11138}
11139declare interface SourceMapDevToolPluginOptions {
11140 /**
11141 * 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.
11142 */
11143 append?: null | string | false;
11144
11145 /**
11146 * Indicates whether column mappings should be used (defaults to true).
11147 */
11148 columns?: boolean;
11149
11150 /**
11151 * Exclude modules that match the given value from source map generation.
11152 */
11153 exclude?: string | RegExp | Rule[];
11154
11155 /**
11156 * 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.
11157 */
11158 fallbackModuleFilenameTemplate?: string | Function;
11159
11160 /**
11161 * Path prefix to which the [file] placeholder is relative to.
11162 */
11163 fileContext?: string;
11164
11165 /**
11166 * Defines the output filename of the SourceMap (will be inlined if no value is provided).
11167 */
11168 filename?: null | string | false;
11169
11170 /**
11171 * Include source maps for module paths that match the given value.
11172 */
11173 include?: string | RegExp | Rule[];
11174
11175 /**
11176 * Indicates whether SourceMaps from loaders should be used (defaults to true).
11177 */
11178 module?: boolean;
11179
11180 /**
11181 * Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap.
11182 */
11183 moduleFilenameTemplate?: string | Function;
11184
11185 /**
11186 * Namespace prefix to allow multiple webpack roots in the devtools.
11187 */
11188 namespace?: string;
11189
11190 /**
11191 * Omit the 'sourceContents' array from the SourceMap.
11192 */
11193 noSources?: boolean;
11194
11195 /**
11196 * Provide a custom public path for the SourceMapping comment.
11197 */
11198 publicPath?: string;
11199
11200 /**
11201 * Provide a custom value for the 'sourceRoot' property in the SourceMap.
11202 */
11203 sourceRoot?: string;
11204
11205 /**
11206 * Include source maps for modules based on their extension (defaults to .js and .css).
11207 */
11208 test?: string | RegExp | Rule[];
11209}
11210declare class SourceMapSource extends Source {
11211 constructor(
11212 source: string | Buffer,
11213 name: string,
11214 sourceMap: string | Object | Buffer,
11215 originalSource?: string | Buffer,
11216 innerSourceMap?: string | Object | Buffer,
11217 removeOriginalSource?: boolean
11218 );
11219 getArgsAsBuffers(): [
11220 Buffer,
11221 string,
11222 Buffer,
11223 undefined | Buffer,
11224 undefined | Buffer,
11225 boolean
11226 ];
11227}
11228declare interface SourcePosition {
11229 line: number;
11230 column?: number;
11231}
11232declare interface SplitChunksOptions {
11233 chunksFilter: (chunk: Chunk) => boolean;
11234 defaultSizeTypes: string[];
11235 minSize: SplitChunksSizes;
11236 minSizeReduction: SplitChunksSizes;
11237 minRemainingSize: SplitChunksSizes;
11238 enforceSizeThreshold: SplitChunksSizes;
11239 maxInitialSize: SplitChunksSizes;
11240 maxAsyncSize: SplitChunksSizes;
11241 minChunks: number;
11242 maxAsyncRequests: number;
11243 maxInitialRequests: number;
11244 hidePathInfo: boolean;
11245 filename: string | ((arg0: PathData, arg1?: AssetInfo) => string);
11246 automaticNameDelimiter: string;
11247 getCacheGroups: (
11248 module: Module,
11249 context: CacheGroupsContext
11250 ) => CacheGroupSource[];
11251 getName: (
11252 module?: Module,
11253 chunks?: Chunk[],
11254 key?: string
11255 ) => undefined | string;
11256 usedExports: boolean;
11257 fallbackCacheGroup: FallbackCacheGroup;
11258}
11259declare class SplitChunksPlugin {
11260 constructor(options?: OptimizationSplitChunksOptions);
11261 options: SplitChunksOptions;
11262
11263 /**
11264 * Apply the plugin
11265 */
11266 apply(compiler: Compiler): void;
11267}
11268declare interface SplitChunksSizes {
11269 [index: string]: number;
11270}
11271declare abstract class StackedMap<K, V> {
11272 map: Map<K, InternalCell<V>>;
11273 stack: Map<K, InternalCell<V>>[];
11274 set(item: K, value: V): void;
11275 delete(item: K): void;
11276 has(item: K): boolean;
11277 get(item: K): Cell<V>;
11278 asArray(): K[];
11279 asSet(): Set<K>;
11280 asPairArray(): [K, Cell<V>][];
11281 asMap(): Map<K, Cell<V>>;
11282 get size(): number;
11283 createChild(): StackedMap<K, V>;
11284}
11285type StartupRenderContext = RenderContext & { inlined: boolean };
11286type Statement =
11287 | FunctionDeclaration
11288 | VariableDeclaration
11289 | ClassDeclaration
11290 | ExpressionStatement
11291 | BlockStatement
11292 | StaticBlock
11293 | EmptyStatement
11294 | DebuggerStatement
11295 | WithStatement
11296 | ReturnStatement
11297 | LabeledStatement
11298 | BreakStatement
11299 | ContinueStatement
11300 | IfStatement
11301 | SwitchStatement
11302 | ThrowStatement
11303 | TryStatement
11304 | WhileStatement
11305 | DoWhileStatement
11306 | ForStatement
11307 | ForInStatement
11308 | ForOfStatement;
11309declare class Stats {
11310 constructor(compilation: Compilation);
11311 compilation: Compilation;
11312 get hash(): string;
11313 get startTime(): any;
11314 get endTime(): any;
11315 hasWarnings(): boolean;
11316 hasErrors(): boolean;
11317 toJson(options?: string | StatsOptions): StatsCompilation;
11318 toString(options?: any): string;
11319}
11320type StatsAsset = KnownStatsAsset & Record<string, any>;
11321type StatsChunk = KnownStatsChunk & Record<string, any>;
11322type StatsChunkGroup = KnownStatsChunkGroup & Record<string, any>;
11323type StatsChunkOrigin = KnownStatsChunkOrigin & Record<string, any>;
11324type StatsCompilation = KnownStatsCompilation & Record<string, any>;
11325type StatsError = KnownStatsError & Record<string, any>;
11326declare abstract class StatsFactory {
11327 hooks: Readonly<{
11328 extract: HookMap<SyncBailHook<[Object, any, StatsFactoryContext], any>>;
11329 filter: HookMap<
11330 SyncBailHook<[any, StatsFactoryContext, number, number], any>
11331 >;
11332 sort: HookMap<
11333 SyncBailHook<
11334 [((arg0?: any, arg1?: any) => number)[], StatsFactoryContext],
11335 any
11336 >
11337 >;
11338 filterSorted: HookMap<
11339 SyncBailHook<[any, StatsFactoryContext, number, number], any>
11340 >;
11341 groupResults: HookMap<
11342 SyncBailHook<[GroupConfig[], StatsFactoryContext], any>
11343 >;
11344 sortResults: HookMap<
11345 SyncBailHook<
11346 [((arg0?: any, arg1?: any) => number)[], StatsFactoryContext],
11347 any
11348 >
11349 >;
11350 filterResults: HookMap<
11351 SyncBailHook<[any, StatsFactoryContext, number, number], any>
11352 >;
11353 merge: HookMap<SyncBailHook<[any[], StatsFactoryContext], any>>;
11354 result: HookMap<SyncBailHook<[any[], StatsFactoryContext], any>>;
11355 getItemName: HookMap<SyncBailHook<[any, StatsFactoryContext], any>>;
11356 getItemFactory: HookMap<SyncBailHook<[any, StatsFactoryContext], any>>;
11357 }>;
11358 create(
11359 type: string,
11360 data: any,
11361 baseContext: Omit<StatsFactoryContext, "type">
11362 ): any;
11363}
11364type StatsFactoryContext = KnownStatsFactoryContext & Record<string, any>;
11365type StatsLogging = KnownStatsLogging & Record<string, any>;
11366type StatsLoggingEntry = KnownStatsLoggingEntry & Record<string, any>;
11367type StatsModule = KnownStatsModule & Record<string, any>;
11368type StatsModuleIssuer = KnownStatsModuleIssuer & Record<string, any>;
11369type StatsModuleReason = KnownStatsModuleReason & Record<string, any>;
11370type StatsModuleTraceDependency = KnownStatsModuleTraceDependency &
11371 Record<string, any>;
11372type StatsModuleTraceItem = KnownStatsModuleTraceItem & Record<string, any>;
11373
11374/**
11375 * Stats options object.
11376 */
11377declare interface StatsOptions {
11378 /**
11379 * Fallback value for stats options when an option is not defined (has precedence over local webpack defaults).
11380 */
11381 all?: boolean;
11382
11383 /**
11384 * Add assets information.
11385 */
11386 assets?: boolean;
11387
11388 /**
11389 * Sort the assets by that field.
11390 */
11391 assetsSort?: string;
11392
11393 /**
11394 * Space to display assets (groups will be collapsed to fit this space).
11395 */
11396 assetsSpace?: number;
11397
11398 /**
11399 * Add built at time information.
11400 */
11401 builtAt?: boolean;
11402
11403 /**
11404 * Add information about cached (not built) modules (deprecated: use 'cachedModules' instead).
11405 */
11406 cached?: boolean;
11407
11408 /**
11409 * Show cached assets (setting this to `false` only shows emitted files).
11410 */
11411 cachedAssets?: boolean;
11412
11413 /**
11414 * Add information about cached (not built) modules.
11415 */
11416 cachedModules?: boolean;
11417
11418 /**
11419 * Add children information.
11420 */
11421 children?: boolean;
11422
11423 /**
11424 * Display auxiliary assets in chunk groups.
11425 */
11426 chunkGroupAuxiliary?: boolean;
11427
11428 /**
11429 * Display children of chunk groups.
11430 */
11431 chunkGroupChildren?: boolean;
11432
11433 /**
11434 * Limit of assets displayed in chunk groups.
11435 */
11436 chunkGroupMaxAssets?: number;
11437
11438 /**
11439 * Display all chunk groups with the corresponding bundles.
11440 */
11441 chunkGroups?: boolean;
11442
11443 /**
11444 * Add built modules information to chunk information.
11445 */
11446 chunkModules?: boolean;
11447
11448 /**
11449 * Space to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group).
11450 */
11451 chunkModulesSpace?: number;
11452
11453 /**
11454 * Add the origins of chunks and chunk merging info.
11455 */
11456 chunkOrigins?: boolean;
11457
11458 /**
11459 * Add information about parent, children and sibling chunks to chunk information.
11460 */
11461 chunkRelations?: boolean;
11462
11463 /**
11464 * Add chunk information.
11465 */
11466 chunks?: boolean;
11467
11468 /**
11469 * Sort the chunks by that field.
11470 */
11471 chunksSort?: string;
11472
11473 /**
11474 * Enables/Disables colorful output.
11475 */
11476 colors?:
11477 | boolean
11478 | {
11479 /**
11480 * Custom color for bold text.
11481 */
11482 bold?: string;
11483 /**
11484 * Custom color for cyan text.
11485 */
11486 cyan?: string;
11487 /**
11488 * Custom color for green text.
11489 */
11490 green?: string;
11491 /**
11492 * Custom color for magenta text.
11493 */
11494 magenta?: string;
11495 /**
11496 * Custom color for red text.
11497 */
11498 red?: string;
11499 /**
11500 * Custom color for yellow text.
11501 */
11502 yellow?: string;
11503 };
11504
11505 /**
11506 * Context directory for request shortening.
11507 */
11508 context?: string;
11509
11510 /**
11511 * Show chunk modules that are dependencies of other modules of the chunk.
11512 */
11513 dependentModules?: boolean;
11514
11515 /**
11516 * Add module depth in module graph.
11517 */
11518 depth?: boolean;
11519
11520 /**
11521 * Display the entry points with the corresponding bundles.
11522 */
11523 entrypoints?: boolean | "auto";
11524
11525 /**
11526 * Add --env information.
11527 */
11528 env?: boolean;
11529
11530 /**
11531 * Add details to errors (like resolving log).
11532 */
11533 errorDetails?: boolean | "auto";
11534
11535 /**
11536 * Add internal stack trace to errors.
11537 */
11538 errorStack?: boolean;
11539
11540 /**
11541 * Add errors.
11542 */
11543 errors?: boolean;
11544
11545 /**
11546 * Add errors count.
11547 */
11548 errorsCount?: boolean;
11549
11550 /**
11551 * Please use excludeModules instead.
11552 */
11553 exclude?:
11554 | string
11555 | boolean
11556 | RegExp
11557 | ModuleFilterItemTypes[]
11558 | ((
11559 name: string,
11560 module: StatsModule,
11561 type: "module" | "chunk" | "root-of-chunk" | "nested"
11562 ) => boolean);
11563
11564 /**
11565 * Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions.
11566 */
11567 excludeAssets?:
11568 | string
11569 | RegExp
11570 | AssetFilterItemTypes[]
11571 | ((name: string, asset: StatsAsset) => boolean);
11572
11573 /**
11574 * Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions.
11575 */
11576 excludeModules?:
11577 | string
11578 | boolean
11579 | RegExp
11580 | ModuleFilterItemTypes[]
11581 | ((
11582 name: string,
11583 module: StatsModule,
11584 type: "module" | "chunk" | "root-of-chunk" | "nested"
11585 ) => boolean);
11586
11587 /**
11588 * Group assets by how their are related to chunks.
11589 */
11590 groupAssetsByChunk?: boolean;
11591
11592 /**
11593 * Group assets by their status (emitted, compared for emit or cached).
11594 */
11595 groupAssetsByEmitStatus?: boolean;
11596
11597 /**
11598 * Group assets by their extension.
11599 */
11600 groupAssetsByExtension?: boolean;
11601
11602 /**
11603 * Group assets by their asset info (immutable, development, hotModuleReplacement, etc).
11604 */
11605 groupAssetsByInfo?: boolean;
11606
11607 /**
11608 * Group assets by their path.
11609 */
11610 groupAssetsByPath?: boolean;
11611
11612 /**
11613 * Group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent).
11614 */
11615 groupModulesByAttributes?: boolean;
11616
11617 /**
11618 * Group modules by their status (cached or built and cacheable).
11619 */
11620 groupModulesByCacheStatus?: boolean;
11621
11622 /**
11623 * Group modules by their extension.
11624 */
11625 groupModulesByExtension?: boolean;
11626
11627 /**
11628 * Group modules by their layer.
11629 */
11630 groupModulesByLayer?: boolean;
11631
11632 /**
11633 * Group modules by their path.
11634 */
11635 groupModulesByPath?: boolean;
11636
11637 /**
11638 * Group modules by their type.
11639 */
11640 groupModulesByType?: boolean;
11641
11642 /**
11643 * Group reasons by their origin module.
11644 */
11645 groupReasonsByOrigin?: boolean;
11646
11647 /**
11648 * Add the hash of the compilation.
11649 */
11650 hash?: boolean;
11651
11652 /**
11653 * Add ids.
11654 */
11655 ids?: boolean;
11656
11657 /**
11658 * Add logging output.
11659 */
11660 logging?: boolean | "none" | "error" | "warn" | "info" | "log" | "verbose";
11661
11662 /**
11663 * Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions.
11664 */
11665 loggingDebug?:
11666 | string
11667 | boolean
11668 | RegExp
11669 | FilterItemTypes[]
11670 | ((value: string) => boolean);
11671
11672 /**
11673 * Add stack traces to logging output.
11674 */
11675 loggingTrace?: boolean;
11676
11677 /**
11678 * Add information about assets inside modules.
11679 */
11680 moduleAssets?: boolean;
11681
11682 /**
11683 * Add dependencies and origin of warnings/errors.
11684 */
11685 moduleTrace?: boolean;
11686
11687 /**
11688 * Add built modules information.
11689 */
11690 modules?: boolean;
11691
11692 /**
11693 * Sort the modules by that field.
11694 */
11695 modulesSort?: string;
11696
11697 /**
11698 * Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups).
11699 */
11700 modulesSpace?: number;
11701
11702 /**
11703 * Add information about modules nested in other modules (like with module concatenation).
11704 */
11705 nestedModules?: boolean;
11706
11707 /**
11708 * Space to display modules nested within other modules (groups will be collapsed to fit this space, value is in number of modules/group).
11709 */
11710 nestedModulesSpace?: number;
11711
11712 /**
11713 * Show reasons why optimization bailed out for modules.
11714 */
11715 optimizationBailout?: boolean;
11716
11717 /**
11718 * Add information about orphan modules.
11719 */
11720 orphanModules?: boolean;
11721
11722 /**
11723 * Add output path information.
11724 */
11725 outputPath?: boolean;
11726
11727 /**
11728 * Add performance hint flags.
11729 */
11730 performance?: boolean;
11731
11732 /**
11733 * Preset for the default values.
11734 */
11735 preset?: string | boolean;
11736
11737 /**
11738 * Show exports provided by modules.
11739 */
11740 providedExports?: boolean;
11741
11742 /**
11743 * Add public path information.
11744 */
11745 publicPath?: boolean;
11746
11747 /**
11748 * Add information about the reasons why modules are included.
11749 */
11750 reasons?: boolean;
11751
11752 /**
11753 * Space to display reasons (groups will be collapsed to fit this space).
11754 */
11755 reasonsSpace?: number;
11756
11757 /**
11758 * Add information about assets that are related to other assets (like SourceMaps for assets).
11759 */
11760 relatedAssets?: boolean;
11761
11762 /**
11763 * Add information about runtime modules (deprecated: use 'runtimeModules' instead).
11764 */
11765 runtime?: boolean;
11766
11767 /**
11768 * Add information about runtime modules.
11769 */
11770 runtimeModules?: boolean;
11771
11772 /**
11773 * Add the source code of modules.
11774 */
11775 source?: boolean;
11776
11777 /**
11778 * Add timing information.
11779 */
11780 timings?: boolean;
11781
11782 /**
11783 * Show exports used by modules.
11784 */
11785 usedExports?: boolean;
11786
11787 /**
11788 * Add webpack version information.
11789 */
11790 version?: boolean;
11791
11792 /**
11793 * Add warnings.
11794 */
11795 warnings?: boolean;
11796
11797 /**
11798 * Add warnings count.
11799 */
11800 warningsCount?: boolean;
11801
11802 /**
11803 * Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions.
11804 */
11805 warningsFilter?:
11806 | string
11807 | RegExp
11808 | WarningFilterItemTypes[]
11809 | ((warning: StatsError, value: string) => boolean);
11810}
11811declare abstract class StatsPrinter {
11812 hooks: Readonly<{
11813 sortElements: HookMap<SyncBailHook<[string[], StatsPrinterContext], true>>;
11814 printElements: HookMap<
11815 SyncBailHook<[PrintedElement[], StatsPrinterContext], string>
11816 >;
11817 sortItems: HookMap<SyncBailHook<[any[], StatsPrinterContext], true>>;
11818 getItemName: HookMap<SyncBailHook<[any, StatsPrinterContext], string>>;
11819 printItems: HookMap<SyncBailHook<[string[], StatsPrinterContext], string>>;
11820 print: HookMap<SyncBailHook<[{}, StatsPrinterContext], string>>;
11821 result: HookMap<SyncWaterfallHook<[string, StatsPrinterContext]>>;
11822 }>;
11823 print(type: string, object: Object, baseContext?: Object): string;
11824}
11825type StatsPrinterContext = KnownStatsPrinterContext & Record<string, any>;
11826type StatsProfile = KnownStatsProfile & Record<string, any>;
11827type StatsValue =
11828 | boolean
11829 | StatsOptions
11830 | "none"
11831 | "verbose"
11832 | "summary"
11833 | "errors-only"
11834 | "errors-warnings"
11835 | "minimal"
11836 | "normal"
11837 | "detailed";
11838declare class SyncModuleIdsPlugin {
11839 constructor(__0: {
11840 /**
11841 * path to file
11842 */
11843 path: string;
11844 /**
11845 * context for module names
11846 */
11847 context?: string;
11848 /**
11849 * selector for modules
11850 */
11851 test: (arg0: Module) => boolean;
11852 /**
11853 * operation mode (defaults to merge)
11854 */
11855 mode?: "read" | "merge" | "create" | "update";
11856 });
11857
11858 /**
11859 * Apply the plugin
11860 */
11861 apply(compiler: Compiler): void;
11862}
11863declare interface SyntheticDependencyLocation {
11864 name: string;
11865 index?: number;
11866}
11867declare const TOMBSTONE: unique symbol;
11868declare const TRANSITIVE: unique symbol;
11869declare const TRANSITIVE_ONLY: unique symbol;
11870declare interface TagInfo {
11871 tag: any;
11872 data: any;
11873 next?: TagInfo;
11874}
11875declare class Template {
11876 constructor();
11877 static getFunctionContent(fn: Function): string;
11878 static toIdentifier(str: string): string;
11879 static toComment(str: string): string;
11880 static toNormalComment(str: string): string;
11881 static toPath(str: string): string;
11882 static numberToIdentifier(n: number): string;
11883 static numberToIdentifierContinuation(n: number): string;
11884 static indent(s: string | string[]): string;
11885 static prefix(s: string | string[], prefix: string): string;
11886 static asString(str: string | string[]): string;
11887 static getModulesArrayBounds(modules: WithId[]): false | [number, number];
11888 static renderChunkModules(
11889 renderContext: ChunkRenderContext,
11890 modules: Module[],
11891 renderModule: (arg0: Module) => Source,
11892 prefix?: string
11893 ): Source;
11894 static renderRuntimeModules(
11895 runtimeModules: RuntimeModule[],
11896 renderContext: RenderContext & {
11897 codeGenerationResults?: CodeGenerationResults;
11898 }
11899 ): Source;
11900 static renderChunkRuntimeModules(
11901 runtimeModules: RuntimeModule[],
11902 renderContext: RenderContext
11903 ): Source;
11904 static NUMBER_OF_IDENTIFIER_START_CHARS: number;
11905 static NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS: number;
11906}
11907declare interface TimestampAndHash {
11908 safeTime: number;
11909 timestamp?: number;
11910 hash: string;
11911}
11912declare class TopLevelSymbol {
11913 constructor(name: string);
11914 name: string;
11915}
11916
11917/**
11918 * Use a Trusted Types policy to create urls for chunks.
11919 */
11920declare interface TrustedTypes {
11921 /**
11922 * The name of the Trusted Types policy created by webpack to serve bundle chunks.
11923 */
11924 policyName?: string;
11925}
11926declare const UNDEFINED_MARKER: unique symbol;
11927declare interface UpdateHashContextDependency {
11928 chunkGraph: ChunkGraph;
11929 runtime: RuntimeSpec;
11930 runtimeTemplate?: RuntimeTemplate;
11931}
11932declare interface UpdateHashContextGenerator {
11933 /**
11934 * the module
11935 */
11936 module: NormalModule;
11937 chunkGraph: ChunkGraph;
11938 runtime: RuntimeSpec;
11939 runtimeTemplate?: RuntimeTemplate;
11940}
11941type UsageStateType = 0 | 1 | 2 | 3 | 4;
11942declare interface UserResolveOptions {
11943 /**
11944 * A list of module alias configurations or an object which maps key to value
11945 */
11946 alias?: AliasOption[] | AliasOptions;
11947
11948 /**
11949 * A list of module alias configurations or an object which maps key to value, applied only after modules option
11950 */
11951 fallback?: AliasOption[] | AliasOptions;
11952
11953 /**
11954 * An object which maps extension to extension aliases
11955 */
11956 extensionAlias?: ExtensionAliasOptions;
11957
11958 /**
11959 * A list of alias fields in description files
11960 */
11961 aliasFields?: (string | string[])[];
11962
11963 /**
11964 * A function which decides whether a request should be cached or not. An object is passed with at least `path` and `request` properties.
11965 */
11966 cachePredicate?: (arg0: ResolveRequest) => boolean;
11967
11968 /**
11969 * Whether or not the unsafeCache should include request context as part of the cache key.
11970 */
11971 cacheWithContext?: boolean;
11972
11973 /**
11974 * A list of description files to read from
11975 */
11976 descriptionFiles?: string[];
11977
11978 /**
11979 * A list of exports field condition names.
11980 */
11981 conditionNames?: string[];
11982
11983 /**
11984 * Enforce that a extension from extensions must be used
11985 */
11986 enforceExtension?: boolean;
11987
11988 /**
11989 * A list of exports fields in description files
11990 */
11991 exportsFields?: (string | string[])[];
11992
11993 /**
11994 * A list of imports fields in description files
11995 */
11996 importsFields?: (string | string[])[];
11997
11998 /**
11999 * A list of extensions which should be tried for files
12000 */
12001 extensions?: string[];
12002
12003 /**
12004 * The file system which should be used
12005 */
12006 fileSystem: FileSystem;
12007
12008 /**
12009 * Use this cache object to unsafely cache the successful requests
12010 */
12011 unsafeCache?: boolean | object;
12012
12013 /**
12014 * Resolve symlinks to their symlinked location
12015 */
12016 symlinks?: boolean;
12017
12018 /**
12019 * A prepared Resolver to which the plugins are attached
12020 */
12021 resolver?: Resolver;
12022
12023 /**
12024 * A list of directories to resolve modules from, can be absolute path or folder name
12025 */
12026 modules?: string | string[];
12027
12028 /**
12029 * A list of main fields in description files
12030 */
12031 mainFields?: (
12032 | string
12033 | string[]
12034 | { name: string | string[]; forceRelative: boolean }
12035 )[];
12036
12037 /**
12038 * A list of main files in directories
12039 */
12040 mainFiles?: string[];
12041
12042 /**
12043 * A list of additional resolve plugins which should be applied
12044 */
12045 plugins?: Plugin[];
12046
12047 /**
12048 * A PnP API that should be used - null is "never", undefined is "auto"
12049 */
12050 pnpApi?: null | PnpApiImpl;
12051
12052 /**
12053 * A list of root paths
12054 */
12055 roots?: string[];
12056
12057 /**
12058 * The request is already fully specified and no extensions or directories are resolved for it
12059 */
12060 fullySpecified?: boolean;
12061
12062 /**
12063 * Resolve to a context instead of a file
12064 */
12065 resolveToContext?: boolean;
12066
12067 /**
12068 * A list of resolve restrictions
12069 */
12070 restrictions?: (string | RegExp)[];
12071
12072 /**
12073 * Use only the sync constraints of the file system calls
12074 */
12075 useSyncFileSystemCalls?: boolean;
12076
12077 /**
12078 * Prefer to resolve module requests as relative requests before falling back to modules
12079 */
12080 preferRelative?: boolean;
12081
12082 /**
12083 * Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots
12084 */
12085 preferAbsolute?: boolean;
12086}
12087declare abstract class VariableInfo {
12088 declaredScope: ScopeInfo;
12089 freeName: string | true;
12090 tagInfo?: TagInfo;
12091}
12092declare interface VariableInfoInterface {
12093 declaredScope: ScopeInfo;
12094 freeName: string | true;
12095 tagInfo?: TagInfo;
12096}
12097type WarningFilterItemTypes =
12098 | string
12099 | RegExp
12100 | ((warning: StatsError, value: string) => boolean);
12101declare interface WatchFileSystem {
12102 watch: (
12103 files: Iterable<string>,
12104 directories: Iterable<string>,
12105 missing: Iterable<string>,
12106 startTime: number,
12107 options: WatchOptions,
12108 callback: (
12109 arg0: undefined | Error,
12110 arg1: Map<string, FileSystemInfoEntry | "ignore">,
12111 arg2: Map<string, FileSystemInfoEntry | "ignore">,
12112 arg3: Set<string>,
12113 arg4: Set<string>
12114 ) => void,
12115 callbackUndelayed: (arg0: string, arg1: number) => void
12116 ) => Watcher;
12117}
12118declare class WatchIgnorePlugin {
12119 constructor(options: WatchIgnorePluginOptions);
12120 paths: (string | RegExp)[];
12121
12122 /**
12123 * Apply the plugin
12124 */
12125 apply(compiler: Compiler): void;
12126}
12127declare interface WatchIgnorePluginOptions {
12128 /**
12129 * A list of RegExps or absolute paths to directories or files that should be ignored.
12130 */
12131 paths: (string | RegExp)[];
12132}
12133
12134/**
12135 * Options for the watcher.
12136 */
12137declare interface WatchOptions {
12138 /**
12139 * Delay the rebuilt after the first change. Value is a time in ms.
12140 */
12141 aggregateTimeout?: number;
12142
12143 /**
12144 * Resolve symlinks and watch symlink and real file. This is usually not needed as webpack already resolves symlinks ('resolve.symlinks').
12145 */
12146 followSymlinks?: boolean;
12147
12148 /**
12149 * Ignore some files from watching (glob pattern or regexp).
12150 */
12151 ignored?: string | RegExp | string[];
12152
12153 /**
12154 * Enable polling mode for watching.
12155 */
12156 poll?: number | boolean;
12157
12158 /**
12159 * Stop watching when stdin stream has ended.
12160 */
12161 stdin?: boolean;
12162}
12163declare interface Watcher {
12164 /**
12165 * closes the watcher and all underlying file watchers
12166 */
12167 close: () => void;
12168
12169 /**
12170 * closes the watcher, but keeps underlying file watchers alive until the next watch call
12171 */
12172 pause: () => void;
12173
12174 /**
12175 * get current aggregated changes that have not yet send to callback
12176 */
12177 getAggregatedChanges?: () => Set<string>;
12178
12179 /**
12180 * get current aggregated removals that have not yet send to callback
12181 */
12182 getAggregatedRemovals?: () => Set<string>;
12183
12184 /**
12185 * get info about files
12186 */
12187 getFileTimeInfoEntries: () => Map<string, FileSystemInfoEntry | "ignore">;
12188
12189 /**
12190 * get info about directories
12191 */
12192 getContextTimeInfoEntries: () => Map<string, FileSystemInfoEntry | "ignore">;
12193
12194 /**
12195 * get info about timestamps and changes
12196 */
12197 getInfo?: () => WatcherInfo;
12198}
12199declare interface WatcherInfo {
12200 /**
12201 * get current aggregated changes that have not yet send to callback
12202 */
12203 changes: Set<string>;
12204
12205 /**
12206 * get current aggregated removals that have not yet send to callback
12207 */
12208 removals: Set<string>;
12209
12210 /**
12211 * get info about files
12212 */
12213 fileTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">;
12214
12215 /**
12216 * get info about directories
12217 */
12218 contextTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">;
12219}
12220declare abstract class Watching {
12221 startTime: null | number;
12222 invalid: boolean;
12223 handler: CallbackFunction<Stats>;
12224 callbacks: CallbackFunction<void>[];
12225 closed: boolean;
12226 suspended: boolean;
12227 blocked: boolean;
12228 watchOptions: {
12229 /**
12230 * Delay the rebuilt after the first change. Value is a time in ms.
12231 */
12232 aggregateTimeout?: number;
12233 /**
12234 * Resolve symlinks and watch symlink and real file. This is usually not needed as webpack already resolves symlinks ('resolve.symlinks').
12235 */
12236 followSymlinks?: boolean;
12237 /**
12238 * Ignore some files from watching (glob pattern or regexp).
12239 */
12240 ignored?: string | RegExp | string[];
12241 /**
12242 * Enable polling mode for watching.
12243 */
12244 poll?: number | boolean;
12245 /**
12246 * Stop watching when stdin stream has ended.
12247 */
12248 stdin?: boolean;
12249 };
12250 compiler: Compiler;
12251 running: boolean;
12252 watcher?: null | Watcher;
12253 pausedWatcher?: null | Watcher;
12254 lastWatcherStartTime?: number;
12255 watch(
12256 files: Iterable<string>,
12257 dirs: Iterable<string>,
12258 missing: Iterable<string>
12259 ): void;
12260 invalidate(callback?: CallbackFunction<void>): void;
12261 suspend(): void;
12262 resume(): void;
12263 close(callback: CallbackFunction<void>): void;
12264}
12265declare abstract class WeakTupleMap<T extends any[], V> {
12266 set(...args: [T, ...V[]]): void;
12267 has(...args: T): boolean;
12268 get(...args: T): V;
12269 provide(...args: [T, ...(() => V)[]]): V;
12270 delete(...args: T): void;
12271 clear(): void;
12272}
12273declare interface WebAssemblyRenderContext {
12274 /**
12275 * the chunk
12276 */
12277 chunk: Chunk;
12278
12279 /**
12280 * the dependency templates
12281 */
12282 dependencyTemplates: DependencyTemplates;
12283
12284 /**
12285 * the runtime template
12286 */
12287 runtimeTemplate: RuntimeTemplate;
12288
12289 /**
12290 * the module graph
12291 */
12292 moduleGraph: ModuleGraph;
12293
12294 /**
12295 * the chunk graph
12296 */
12297 chunkGraph: ChunkGraph;
12298
12299 /**
12300 * results of code generation
12301 */
12302 codeGenerationResults: CodeGenerationResults;
12303}
12304declare class WebWorkerTemplatePlugin {
12305 constructor();
12306
12307 /**
12308 * Apply the plugin
12309 */
12310 apply(compiler: Compiler): void;
12311}
12312declare class WebpackError extends Error {
12313 /**
12314 * Creates an instance of WebpackError.
12315 */
12316 constructor(message?: string);
12317 details: any;
12318 module: Module;
12319 loc: DependencyLocation;
12320 hideStack: boolean;
12321 chunk: Chunk;
12322 file: string;
12323 serialize(__0: { write: any }): void;
12324 deserialize(__0: { read: any }): void;
12325
12326 /**
12327 * Create .stack property on a target object
12328 */
12329 static captureStackTrace(
12330 targetObject: object,
12331 constructorOpt?: Function
12332 ): void;
12333
12334 /**
12335 * Optional override for formatting stack traces
12336 */
12337 static prepareStackTrace?: (
12338 err: Error,
12339 stackTraces: NodeJS.CallSite[]
12340 ) => any;
12341 static stackTraceLimit: number;
12342}
12343declare abstract class WebpackLogger {
12344 getChildLogger: (arg0: string | (() => string)) => WebpackLogger;
12345 error(...args: any[]): void;
12346 warn(...args: any[]): void;
12347 info(...args: any[]): void;
12348 log(...args: any[]): void;
12349 debug(...args: any[]): void;
12350 assert(assertion: any, ...args: any[]): void;
12351 trace(): void;
12352 clear(): void;
12353 status(...args: any[]): void;
12354 group(...args: any[]): void;
12355 groupCollapsed(...args: any[]): void;
12356 groupEnd(...args: any[]): void;
12357 profile(label?: any): void;
12358 profileEnd(label?: any): void;
12359 time(label?: any): void;
12360 timeLog(label?: any): void;
12361 timeEnd(label?: any): void;
12362 timeAggregate(label?: any): void;
12363 timeAggregateEnd(label?: any): void;
12364}
12365declare class WebpackOptionsApply extends OptionsApply {
12366 constructor();
12367}
12368declare class WebpackOptionsDefaulter {
12369 constructor();
12370 process(options?: any): any;
12371}
12372
12373/**
12374 * Normalized webpack options object.
12375 */
12376declare interface WebpackOptionsNormalized {
12377 /**
12378 * Set the value of `require.amd` and `define.amd`. Or disable AMD support.
12379 */
12380 amd?: false | { [index: string]: any };
12381
12382 /**
12383 * Report the first error as a hard error instead of tolerating it.
12384 */
12385 bail?: boolean;
12386
12387 /**
12388 * Cache generated modules and chunks to improve performance for multiple incremental builds.
12389 */
12390 cache: CacheOptionsNormalized;
12391
12392 /**
12393 * The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
12394 */
12395 context?: string;
12396
12397 /**
12398 * References to other configurations to depend on.
12399 */
12400 dependencies?: string[];
12401
12402 /**
12403 * Options for the webpack-dev-server.
12404 */
12405 devServer?: DevServer;
12406
12407 /**
12408 * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
12409 */
12410 devtool?: string | false;
12411
12412 /**
12413 * The entry point(s) of the compilation.
12414 */
12415 entry: EntryNormalized;
12416
12417 /**
12418 * Enables/Disables experiments (experimental features with relax SemVer compatibility).
12419 */
12420 experiments: ExperimentsNormalized;
12421
12422 /**
12423 * 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`.
12424 */
12425 externals: Externals;
12426
12427 /**
12428 * Enable presets of externals for specific targets.
12429 */
12430 externalsPresets: ExternalsPresets;
12431
12432 /**
12433 * Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
12434 */
12435 externalsType?:
12436 | "import"
12437 | "var"
12438 | "module"
12439 | "assign"
12440 | "this"
12441 | "window"
12442 | "self"
12443 | "global"
12444 | "commonjs"
12445 | "commonjs2"
12446 | "commonjs-module"
12447 | "commonjs-static"
12448 | "amd"
12449 | "amd-require"
12450 | "umd"
12451 | "umd2"
12452 | "jsonp"
12453 | "system"
12454 | "promise"
12455 | "script"
12456 | "node-commonjs";
12457
12458 /**
12459 * Ignore specific warnings.
12460 */
12461 ignoreWarnings?: ((
12462 warning: WebpackError,
12463 compilation: Compilation
12464 ) => boolean)[];
12465
12466 /**
12467 * Options for infrastructure level logging.
12468 */
12469 infrastructureLogging: InfrastructureLogging;
12470
12471 /**
12472 * Custom values available in the loader context.
12473 */
12474 loader?: Loader;
12475
12476 /**
12477 * Enable production optimizations or development hints.
12478 */
12479 mode?: "none" | "development" | "production";
12480
12481 /**
12482 * Options affecting the normal modules (`NormalModuleFactory`).
12483 */
12484 module: ModuleOptionsNormalized;
12485
12486 /**
12487 * Name of the configuration. Used when loading multiple configurations.
12488 */
12489 name?: string;
12490
12491 /**
12492 * Include polyfills or mocks for various node stuff.
12493 */
12494 node: NodeWebpackOptions;
12495
12496 /**
12497 * Enables/Disables integrated optimizations.
12498 */
12499 optimization: Optimization;
12500
12501 /**
12502 * Normalized options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
12503 */
12504 output: OutputNormalized;
12505
12506 /**
12507 * The number of parallel processed modules in the compilation.
12508 */
12509 parallelism?: number;
12510
12511 /**
12512 * Configuration for web performance recommendations.
12513 */
12514 performance?: false | PerformanceOptions;
12515
12516 /**
12517 * Add additional plugins to the compiler.
12518 */
12519 plugins: (
12520 | ((this: Compiler, compiler: Compiler) => void)
12521 | WebpackPluginInstance
12522 )[];
12523
12524 /**
12525 * Capture timing information for each module.
12526 */
12527 profile?: boolean;
12528
12529 /**
12530 * Store compiler state to a json file.
12531 */
12532 recordsInputPath?: string | false;
12533
12534 /**
12535 * Load compiler state from a json file.
12536 */
12537 recordsOutputPath?: string | false;
12538
12539 /**
12540 * Options for the resolver.
12541 */
12542 resolve: ResolveOptionsWebpackOptions;
12543
12544 /**
12545 * Options for the resolver when resolving loaders.
12546 */
12547 resolveLoader: ResolveOptionsWebpackOptions;
12548
12549 /**
12550 * Options affecting how file system snapshots are created and validated.
12551 */
12552 snapshot: SnapshotOptions;
12553
12554 /**
12555 * Stats options object or preset name.
12556 */
12557 stats: StatsValue;
12558
12559 /**
12560 * Environment to build for. An array of environments to build for all of them when possible.
12561 */
12562 target?: string | false | string[];
12563
12564 /**
12565 * Enter watch mode, which rebuilds on file change.
12566 */
12567 watch?: boolean;
12568
12569 /**
12570 * Options for the watcher.
12571 */
12572 watchOptions: WatchOptions;
12573}
12574
12575/**
12576 * Plugin instance.
12577 */
12578declare interface WebpackPluginInstance {
12579 [index: string]: any;
12580
12581 /**
12582 * The run point of the plugin, required method.
12583 */
12584 apply: (compiler: Compiler) => void;
12585}
12586declare interface WithId {
12587 id: string | number;
12588}
12589declare interface WithOptions {
12590 /**
12591 * create a resolver with additional/different options
12592 */
12593 withOptions: (
12594 arg0: Partial<ResolveOptionsWithDependencyType>
12595 ) => ResolverWithOptions;
12596}
12597declare interface WriteOnlySet<T> {
12598 add: (T?: any) => void;
12599}
12600type __TypeWebpackOptions = (data: object) =>
12601 | string
12602 | {
12603 /**
12604 * Unique loader options identifier.
12605 */
12606 ident?: string;
12607 /**
12608 * Loader name.
12609 */
12610 loader?: string;
12611 /**
12612 * Loader options.
12613 */
12614 options?: string | { [index: string]: any };
12615 }
12616 | __TypeWebpackOptions
12617 | RuleSetUseItem[];
12618declare function exports(
12619 options: Configuration,
12620 callback?: CallbackWebpack<Stats>
12621): Compiler;
12622declare function exports(
12623 options: ReadonlyArray<Configuration> & MultiCompilerOptions,
12624 callback?: CallbackWebpack<MultiStats>
12625): MultiCompiler;
12626declare namespace exports {
12627 export const webpack: {
12628 (options: Configuration, callback?: CallbackWebpack<Stats>): Compiler;
12629 (
12630 options: ReadonlyArray<Configuration> & MultiCompilerOptions,
12631 callback?: CallbackWebpack<MultiStats>
12632 ): MultiCompiler;
12633 };
12634 export const validate: (options?: any) => void;
12635 export const validateSchema: (
12636 schema: Parameters<typeof validateFunction>[0],
12637 options: Parameters<typeof validateFunction>[1],
12638 validationConfiguration?: ValidationErrorConfiguration
12639 ) => void;
12640 export const version: string;
12641 export namespace cli {
12642 export let getArguments: (schema?: any) => Record<string, Argument>;
12643 export let processArguments: (
12644 args: Record<string, Argument>,
12645 config: any,
12646 values: Record<
12647 string,
12648 | string
12649 | number
12650 | boolean
12651 | RegExp
12652 | (string | number | boolean | RegExp)[]
12653 >
12654 ) => null | Problem[];
12655 }
12656 export namespace ModuleFilenameHelpers {
12657 export let ALL_LOADERS_RESOURCE: string;
12658 export let REGEXP_ALL_LOADERS_RESOURCE: RegExp;
12659 export let LOADERS_RESOURCE: string;
12660 export let REGEXP_LOADERS_RESOURCE: RegExp;
12661 export let RESOURCE: string;
12662 export let REGEXP_RESOURCE: RegExp;
12663 export let ABSOLUTE_RESOURCE_PATH: string;
12664 export let REGEXP_ABSOLUTE_RESOURCE_PATH: RegExp;
12665 export let RESOURCE_PATH: string;
12666 export let REGEXP_RESOURCE_PATH: RegExp;
12667 export let ALL_LOADERS: string;
12668 export let REGEXP_ALL_LOADERS: RegExp;
12669 export let LOADERS: string;
12670 export let REGEXP_LOADERS: RegExp;
12671 export let QUERY: string;
12672 export let REGEXP_QUERY: RegExp;
12673 export let ID: string;
12674 export let REGEXP_ID: RegExp;
12675 export let HASH: string;
12676 export let REGEXP_HASH: RegExp;
12677 export let NAMESPACE: string;
12678 export let REGEXP_NAMESPACE: RegExp;
12679 export let createFilename: (
12680 module: string | Module,
12681 options: any,
12682 __2: {
12683 /**
12684 * requestShortener
12685 */
12686 requestShortener: RequestShortener;
12687 /**
12688 * chunk graph
12689 */
12690 chunkGraph: ChunkGraph;
12691 /**
12692 * the hash function to use
12693 */
12694 hashFunction: string | typeof Hash;
12695 }
12696 ) => string;
12697 export let replaceDuplicates: (
12698 array?: any,
12699 fn?: any,
12700 comparator?: any
12701 ) => any;
12702 export let matchPart: (str?: any, test?: any) => any;
12703 export let matchObject: (obj?: any, str?: any) => boolean;
12704 }
12705 export namespace RuntimeGlobals {
12706 export let require: "__webpack_require__";
12707 export let requireScope: "__webpack_require__.*";
12708 export let exports: "__webpack_exports__";
12709 export let thisAsExports: "top-level-this-exports";
12710 export let returnExportsFromRuntime: "return-exports-from-runtime";
12711 export let module: "module";
12712 export let moduleId: "module.id";
12713 export let moduleLoaded: "module.loaded";
12714 export let publicPath: "__webpack_require__.p";
12715 export let entryModuleId: "__webpack_require__.s";
12716 export let moduleCache: "__webpack_require__.c";
12717 export let moduleFactories: "__webpack_require__.m";
12718 export let moduleFactoriesAddOnly: "__webpack_require__.m (add only)";
12719 export let ensureChunk: "__webpack_require__.e";
12720 export let ensureChunkHandlers: "__webpack_require__.f";
12721 export let ensureChunkIncludeEntries: "__webpack_require__.f (include entries)";
12722 export let prefetchChunk: "__webpack_require__.E";
12723 export let prefetchChunkHandlers: "__webpack_require__.F";
12724 export let preloadChunk: "__webpack_require__.G";
12725 export let preloadChunkHandlers: "__webpack_require__.H";
12726 export let definePropertyGetters: "__webpack_require__.d";
12727 export let makeNamespaceObject: "__webpack_require__.r";
12728 export let createFakeNamespaceObject: "__webpack_require__.t";
12729 export let compatGetDefaultExport: "__webpack_require__.n";
12730 export let harmonyModuleDecorator: "__webpack_require__.hmd";
12731 export let nodeModuleDecorator: "__webpack_require__.nmd";
12732 export let getFullHash: "__webpack_require__.h";
12733 export let wasmInstances: "__webpack_require__.w";
12734 export let instantiateWasm: "__webpack_require__.v";
12735 export let uncaughtErrorHandler: "__webpack_require__.oe";
12736 export let scriptNonce: "__webpack_require__.nc";
12737 export let loadScript: "__webpack_require__.l";
12738 export let createScript: "__webpack_require__.ts";
12739 export let createScriptUrl: "__webpack_require__.tu";
12740 export let getTrustedTypesPolicy: "__webpack_require__.tt";
12741 export let chunkName: "__webpack_require__.cn";
12742 export let runtimeId: "__webpack_require__.j";
12743 export let getChunkScriptFilename: "__webpack_require__.u";
12744 export let getChunkCssFilename: "__webpack_require__.k";
12745 export let hasCssModules: "has css modules";
12746 export let getChunkUpdateScriptFilename: "__webpack_require__.hu";
12747 export let getChunkUpdateCssFilename: "__webpack_require__.hk";
12748 export let startup: "__webpack_require__.x";
12749 export let startupNoDefault: "__webpack_require__.x (no default handler)";
12750 export let startupOnlyAfter: "__webpack_require__.x (only after)";
12751 export let startupOnlyBefore: "__webpack_require__.x (only before)";
12752 export let chunkCallback: "webpackChunk";
12753 export let startupEntrypoint: "__webpack_require__.X";
12754 export let onChunksLoaded: "__webpack_require__.O";
12755 export let externalInstallChunk: "__webpack_require__.C";
12756 export let interceptModuleExecution: "__webpack_require__.i";
12757 export let global: "__webpack_require__.g";
12758 export let shareScopeMap: "__webpack_require__.S";
12759 export let initializeSharing: "__webpack_require__.I";
12760 export let currentRemoteGetScope: "__webpack_require__.R";
12761 export let getUpdateManifestFilename: "__webpack_require__.hmrF";
12762 export let hmrDownloadManifest: "__webpack_require__.hmrM";
12763 export let hmrDownloadUpdateHandlers: "__webpack_require__.hmrC";
12764 export let hmrModuleData: "__webpack_require__.hmrD";
12765 export let hmrInvalidateModuleHandlers: "__webpack_require__.hmrI";
12766 export let hmrRuntimeStatePrefix: "__webpack_require__.hmrS";
12767 export let amdDefine: "__webpack_require__.amdD";
12768 export let amdOptions: "__webpack_require__.amdO";
12769 export let system: "__webpack_require__.System";
12770 export let hasOwnProperty: "__webpack_require__.o";
12771 export let systemContext: "__webpack_require__.y";
12772 export let baseURI: "__webpack_require__.b";
12773 export let relativeUrl: "__webpack_require__.U";
12774 export let asyncModule: "__webpack_require__.a";
12775 }
12776 export const UsageState: Readonly<{
12777 Unused: 0;
12778 OnlyPropertiesUsed: 1;
12779 NoInfo: 2;
12780 Unknown: 3;
12781 Used: 4;
12782 }>;
12783 export namespace cache {
12784 export { MemoryCachePlugin };
12785 }
12786 export namespace config {
12787 export const getNormalizedWebpackOptions: (
12788 config: Configuration
12789 ) => WebpackOptionsNormalized;
12790 export const applyWebpackOptionsDefaults: (
12791 options: WebpackOptionsNormalized
12792 ) => void;
12793 }
12794 export namespace dependencies {
12795 export {
12796 ModuleDependency,
12797 HarmonyImportDependency,
12798 ConstDependency,
12799 NullDependency
12800 };
12801 }
12802 export namespace ids {
12803 export {
12804 ChunkModuleIdRangePlugin,
12805 NaturalModuleIdsPlugin,
12806 OccurrenceModuleIdsPlugin,
12807 NamedModuleIdsPlugin,
12808 DeterministicChunkIdsPlugin,
12809 DeterministicModuleIdsPlugin,
12810 NamedChunkIdsPlugin,
12811 OccurrenceChunkIdsPlugin,
12812 HashedModuleIdsPlugin
12813 };
12814 }
12815 export namespace javascript {
12816 export {
12817 EnableChunkLoadingPlugin,
12818 JavascriptModulesPlugin,
12819 JavascriptParser
12820 };
12821 }
12822 export namespace optimize {
12823 export namespace InnerGraph {
12824 export let bailout: (parserState: ParserState) => void;
12825 export let enable: (parserState: ParserState) => void;
12826 export let isEnabled: (parserState: ParserState) => boolean;
12827 export let addUsage: (
12828 state: ParserState,
12829 symbol: null | TopLevelSymbol,
12830 usage: string | true | TopLevelSymbol
12831 ) => void;
12832 export let addVariableUsage: (
12833 parser: JavascriptParser,
12834 name: string,
12835 usage: string | true | TopLevelSymbol
12836 ) => void;
12837 export let inferDependencyUsage: (state: ParserState) => void;
12838 export let onUsage: (
12839 state: ParserState,
12840 onUsageCallback: (arg0?: boolean | Set<string>) => void
12841 ) => void;
12842 export let setTopLevelSymbol: (
12843 state: ParserState,
12844 symbol: TopLevelSymbol
12845 ) => void;
12846 export let getTopLevelSymbol: (
12847 state: ParserState
12848 ) => void | TopLevelSymbol;
12849 export let tagTopLevelSymbol: (
12850 parser: JavascriptParser,
12851 name: string
12852 ) => TopLevelSymbol;
12853 export let isDependencyUsedByExports: (
12854 dependency: Dependency,
12855 usedByExports: boolean | Set<string>,
12856 moduleGraph: ModuleGraph,
12857 runtime: RuntimeSpec
12858 ) => boolean;
12859 export let getDependencyUsedByExportsCondition: (
12860 dependency: Dependency,
12861 usedByExports: boolean | Set<string>,
12862 moduleGraph: ModuleGraph
12863 ) =>
12864 | null
12865 | false
12866 | ((arg0: ModuleGraphConnection, arg1: RuntimeSpec) => ConnectionState);
12867 export { TopLevelSymbol, topLevelSymbolTag };
12868 }
12869 export {
12870 AggressiveMergingPlugin,
12871 AggressiveSplittingPlugin,
12872 LimitChunkCountPlugin,
12873 MinChunkSizePlugin,
12874 ModuleConcatenationPlugin,
12875 RealContentHashPlugin,
12876 RuntimeChunkPlugin,
12877 SideEffectsFlagPlugin,
12878 SplitChunksPlugin
12879 };
12880 }
12881 export namespace runtime {
12882 export { GetChunkFilenameRuntimeModule, LoadScriptRuntimeModule };
12883 }
12884 export namespace prefetch {
12885 export { ChunkPrefetchPreloadPlugin };
12886 }
12887 export namespace web {
12888 export {
12889 FetchCompileAsyncWasmPlugin,
12890 FetchCompileWasmPlugin,
12891 JsonpChunkLoadingRuntimeModule,
12892 JsonpTemplatePlugin
12893 };
12894 }
12895 export namespace webworker {
12896 export { WebWorkerTemplatePlugin };
12897 }
12898 export namespace node {
12899 export {
12900 NodeEnvironmentPlugin,
12901 NodeSourcePlugin,
12902 NodeTargetPlugin,
12903 NodeTemplatePlugin,
12904 ReadFileCompileWasmPlugin
12905 };
12906 }
12907 export namespace electron {
12908 export { ElectronTargetPlugin };
12909 }
12910 export namespace wasm {
12911 export { AsyncWebAssemblyModulesPlugin, EnableWasmLoadingPlugin };
12912 }
12913 export namespace library {
12914 export { AbstractLibraryPlugin, EnableLibraryPlugin };
12915 }
12916 export namespace container {
12917 export const scope: <T>(
12918 scope: string,
12919 options: ContainerOptionsFormat<T>
12920 ) => Record<string, string | string[] | T>;
12921 export {
12922 ContainerPlugin,
12923 ContainerReferencePlugin,
12924 ModuleFederationPlugin
12925 };
12926 }
12927 export namespace sharing {
12928 export const scope: <T>(
12929 scope: string,
12930 options: ContainerOptionsFormat<T>
12931 ) => Record<string, string | string[] | T>;
12932 export { ConsumeSharedPlugin, ProvideSharedPlugin, SharePlugin };
12933 }
12934 export namespace debug {
12935 export { ProfilingPlugin };
12936 }
12937 export namespace util {
12938 export const createHash: (algorithm: string | typeof Hash) => Hash;
12939 export namespace comparators {
12940 export let compareChunksById: (a: Chunk, b: Chunk) => 0 | 1 | -1;
12941 export let compareModulesByIdentifier: (
12942 a: Module,
12943 b: Module
12944 ) => 0 | 1 | -1;
12945 export let compareModulesById: ParameterizedComparator<
12946 ChunkGraph,
12947 Module
12948 >;
12949 export let compareNumbers: (a: number, b: number) => 0 | 1 | -1;
12950 export let compareStringsNumeric: (a: string, b: string) => 0 | 1 | -1;
12951 export let compareModulesByPostOrderIndexOrIdentifier: ParameterizedComparator<
12952 ModuleGraph,
12953 Module
12954 >;
12955 export let compareModulesByPreOrderIndexOrIdentifier: ParameterizedComparator<
12956 ModuleGraph,
12957 Module
12958 >;
12959 export let compareModulesByIdOrIdentifier: ParameterizedComparator<
12960 ChunkGraph,
12961 Module
12962 >;
12963 export let compareChunks: ParameterizedComparator<ChunkGraph, Chunk>;
12964 export let compareIds: (
12965 a: string | number,
12966 b: string | number
12967 ) => 0 | 1 | -1;
12968 export let compareStrings: (a: string, b: string) => 0 | 1 | -1;
12969 export let compareChunkGroupsByIndex: (
12970 a: ChunkGroup,
12971 b: ChunkGroup
12972 ) => 0 | 1 | -1;
12973 export let concatComparators: <T>(
12974 c1: Comparator<T>,
12975 c2: Comparator<T>,
12976 ...cRest: Comparator<T>[]
12977 ) => Comparator<T>;
12978 export let compareSelect: <T, R>(
12979 getter: Selector<T, R>,
12980 comparator: Comparator<R>
12981 ) => Comparator<T>;
12982 export let compareIterables: <T>(
12983 elementComparator: Comparator<T>
12984 ) => Comparator<Iterable<T>>;
12985 export let keepOriginalOrder: <T>(iterable: Iterable<T>) => Comparator<T>;
12986 export let compareChunksNatural: (
12987 chunkGraph: ChunkGraph
12988 ) => Comparator<Chunk>;
12989 export let compareLocations: (
12990 a: DependencyLocation,
12991 b: DependencyLocation
12992 ) => 0 | 1 | -1;
12993 }
12994 export namespace runtime {
12995 export let getEntryRuntime: (
12996 compilation: Compilation,
12997 name: string,
12998 options?: EntryOptions
12999 ) => RuntimeSpec;
13000 export let forEachRuntime: (
13001 runtime: RuntimeSpec,
13002 fn: (arg0: string) => void,
13003 deterministicOrder?: boolean
13004 ) => void;
13005 export let getRuntimeKey: (runtime: RuntimeSpec) => string;
13006 export let keyToRuntime: (key: string) => RuntimeSpec;
13007 export let runtimeToString: (runtime: RuntimeSpec) => string;
13008 export let runtimeConditionToString: (
13009 runtimeCondition: RuntimeCondition
13010 ) => string;
13011 export let runtimeEqual: (a: RuntimeSpec, b: RuntimeSpec) => boolean;
13012 export let compareRuntime: (a: RuntimeSpec, b: RuntimeSpec) => 0 | 1 | -1;
13013 export let mergeRuntime: (a: RuntimeSpec, b: RuntimeSpec) => RuntimeSpec;
13014 export let mergeRuntimeCondition: (
13015 a: RuntimeCondition,
13016 b: RuntimeCondition,
13017 runtime: RuntimeSpec
13018 ) => RuntimeCondition;
13019 export let mergeRuntimeConditionNonFalse: (
13020 a: undefined | string | true | SortableSet<string>,
13021 b: undefined | string | true | SortableSet<string>,
13022 runtime: RuntimeSpec
13023 ) => undefined | string | true | SortableSet<string>;
13024 export let mergeRuntimeOwned: (
13025 a: RuntimeSpec,
13026 b: RuntimeSpec
13027 ) => RuntimeSpec;
13028 export let intersectRuntime: (
13029 a: RuntimeSpec,
13030 b: RuntimeSpec
13031 ) => RuntimeSpec;
13032 export let subtractRuntime: (
13033 a: RuntimeSpec,
13034 b: RuntimeSpec
13035 ) => RuntimeSpec;
13036 export let subtractRuntimeCondition: (
13037 a: RuntimeCondition,
13038 b: RuntimeCondition,
13039 runtime: RuntimeSpec
13040 ) => RuntimeCondition;
13041 export let filterRuntime: (
13042 runtime: RuntimeSpec,
13043 filter: (arg0: RuntimeSpec) => boolean
13044 ) => undefined | string | boolean | SortableSet<string>;
13045 export { RuntimeSpecMap, RuntimeSpecSet };
13046 }
13047 export namespace serialization {
13048 export const register: (
13049 Constructor: Constructor,
13050 request: string,
13051 name: string,
13052 serializer: ObjectSerializer
13053 ) => void;
13054 export const registerLoader: (
13055 regExp: RegExp,
13056 loader: (arg0: string) => boolean
13057 ) => void;
13058 export const registerNotSerializable: (Constructor: Constructor) => void;
13059 export const NOT_SERIALIZABLE: object;
13060 export const buffersSerializer: Serializer;
13061 export let createFileSerializer: (
13062 fs?: any,
13063 hashFunction?: any
13064 ) => Serializer;
13065 export { MEASURE_START_OPERATION, MEASURE_END_OPERATION };
13066 }
13067 export const cleverMerge: <T, O>(first: T, second: O) => T | O | (T & O);
13068 export { LazySet };
13069 }
13070 export namespace sources {
13071 export {
13072 Source,
13073 RawSource,
13074 OriginalSource,
13075 ReplaceSource,
13076 SourceMapSource,
13077 ConcatSource,
13078 PrefixSource,
13079 CachedSource,
13080 SizeOnlySource,
13081 CompatSource
13082 };
13083 }
13084 export namespace experiments {
13085 export namespace schemes {
13086 export { HttpUriPlugin };
13087 }
13088 export namespace ids {
13089 export { SyncModuleIdsPlugin };
13090 }
13091 }
13092 export type WebpackPluginFunction = (
13093 this: Compiler,
13094 compiler: Compiler
13095 ) => void;
13096 export {
13097 AutomaticPrefetchPlugin,
13098 AsyncDependenciesBlock,
13099 BannerPlugin,
13100 Cache,
13101 Chunk,
13102 ChunkGraph,
13103 CleanPlugin,
13104 Compilation,
13105 Compiler,
13106 ConcatenationScope,
13107 ContextExclusionPlugin,
13108 ContextReplacementPlugin,
13109 DefinePlugin,
13110 DelegatedPlugin,
13111 Dependency,
13112 DllPlugin,
13113 DllReferencePlugin,
13114 DynamicEntryPlugin,
13115 EntryOptionPlugin,
13116 EntryPlugin,
13117 EnvironmentPlugin,
13118 EvalDevToolModulePlugin,
13119 EvalSourceMapDevToolPlugin,
13120 ExternalModule,
13121 ExternalsPlugin,
13122 Generator,
13123 HotUpdateChunk,
13124 HotModuleReplacementPlugin,
13125 IgnorePlugin,
13126 JavascriptModulesPlugin,
13127 LibManifestPlugin,
13128 LibraryTemplatePlugin,
13129 LoaderOptionsPlugin,
13130 LoaderTargetPlugin,
13131 Module,
13132 ModuleGraph,
13133 ModuleGraphConnection,
13134 NoEmitOnErrorsPlugin,
13135 NormalModule,
13136 NormalModuleReplacementPlugin,
13137 MultiCompiler,
13138 Parser,
13139 PrefetchPlugin,
13140 ProgressPlugin,
13141 ProvidePlugin,
13142 RuntimeModule,
13143 EntryPlugin as SingleEntryPlugin,
13144 SourceMapDevToolPlugin,
13145 Stats,
13146 Template,
13147 WatchIgnorePlugin,
13148 WebpackError,
13149 WebpackOptionsApply,
13150 WebpackOptionsDefaulter,
13151 ValidationError as WebpackOptionsValidationError,
13152 ValidationError,
13153 Entry,
13154 EntryNormalized,
13155 EntryObject,
13156 FileCacheOptions,
13157 LibraryOptions,
13158 ModuleOptions,
13159 ResolveOptionsWebpackOptions as ResolveOptions,
13160 RuleSetCondition,
13161 RuleSetConditionAbsolute,
13162 RuleSetRule,
13163 RuleSetUse,
13164 RuleSetUseItem,
13165 StatsOptions,
13166 Configuration,
13167 WebpackOptionsNormalized,
13168 WebpackPluginInstance,
13169 Asset,
13170 AssetInfo,
13171 EntryOptions,
13172 PathData,
13173 AssetEmittedInfo,
13174 MultiStats,
13175 ParserState,
13176 ResolvePluginInstance,
13177 Resolver,
13178 Watching,
13179 Argument,
13180 Problem,
13181 StatsAsset,
13182 StatsChunk,
13183 StatsChunkGroup,
13184 StatsChunkOrigin,
13185 StatsCompilation,
13186 StatsError,
13187 StatsLogging,
13188 StatsLoggingEntry,
13189 StatsModule,
13190 StatsModuleIssuer,
13191 StatsModuleReason,
13192 StatsModuleTraceDependency,
13193 StatsModuleTraceItem,
13194 StatsProfile,
13195 LoaderModule,
13196 RawLoaderDefinition,
13197 LoaderDefinition,
13198 LoaderDefinitionFunction,
13199 PitchLoaderDefinitionFunction,
13200 RawLoaderDefinitionFunction,
13201 LoaderContext
13202 };
13203}
13204declare const topLevelSymbolTag: unique symbol;
13205
13206export = exports;