UNPKG

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