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