@umijs/bundler-webpack 4.0.0-rc.9 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/client/client.js +65 -37
- package/client/constants.js +9 -0
- package/compiled/css-minimizer-webpack-plugin/index.js +7 -7
- package/compiled/cssnano/index.js +6 -6
- package/compiled/fork-ts-checker-webpack-plugin/index.js +7 -13
- package/compiled/{tapable → react-refresh}/LICENSE +6 -6
- package/compiled/react-refresh/index.js +9 -7
- package/compiled/react-refresh/package.json +1 -0
- package/compiled/webpack/BasicEffectRulePlugin.js +1 -0
- package/compiled/webpack/BasicMatcherRulePlugin.js +1 -0
- package/compiled/webpack/HotModuleReplacement.runtime.js +29 -14
- package/compiled/webpack/JavascriptHotModuleReplacement.runtime.js +4 -3
- package/compiled/webpack/ObjectMatcherRulePlugin.js +1 -0
- package/compiled/webpack/RuleSetCompiler.js +1 -0
- package/compiled/webpack/UseEffectRulePlugin.js +1 -0
- package/compiled/webpack/deepImports.json +6 -1
- package/compiled/webpack/index.js +3978 -3167
- package/compiled/webpack/types.d.ts +606 -171
- package/compiled/webpack-dev-middleware/index.js +8 -7
- package/compiled/webpack-manifest-plugin/index.js +1 -1
- package/dist/build.d.ts +1 -0
- package/dist/build.js +49 -56
- package/dist/cli.js +6 -15
- package/dist/client/client.js +52 -50
- package/dist/config/_sampleFeature.js +6 -17
- package/dist/config/assetRules.js +33 -55
- package/dist/config/bundleAnalyzerPlugin.js +12 -23
- package/dist/config/compressPlugin.js +89 -70
- package/dist/config/config.d.ts +2 -0
- package/dist/config/config.js +182 -179
- package/dist/config/copyPlugin.js +29 -40
- package/dist/config/cssRules.js +114 -83
- package/dist/config/definePlugin.js +11 -19
- package/dist/config/detectDeadCodePlugin.js +16 -21
- package/dist/config/fastRefreshPlugin.js +11 -22
- package/dist/config/forkTSCheckerPlugin.js +11 -22
- package/dist/config/harmonyLinkingErrorPlugin.js +3 -14
- package/dist/config/ignorePlugin.js +10 -21
- package/dist/config/javaScriptRules.d.ts +1 -0
- package/dist/config/javaScriptRules.js +152 -136
- package/dist/config/manifestPlugin.d.ts +1 -1
- package/dist/config/manifestPlugin.js +10 -18
- package/dist/config/miniCSSExtractPlugin.js +15 -23
- package/dist/config/nodePolyfill.js +14 -20
- package/dist/config/nodePrefixPlugin.d.ts +11 -0
- package/dist/config/nodePrefixPlugin.js +14 -0
- package/dist/config/progressPlugin.js +7 -18
- package/dist/config/purgecssWebpackPlugin.js +15 -26
- package/dist/config/speedMeasureWebpackPlugin.js +12 -23
- package/dist/config/ssrPlugin.d.ts +11 -0
- package/dist/config/ssrPlugin.js +66 -0
- package/dist/config/svgRules.js +35 -44
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +7 -1
- package/dist/dev.d.ts +4 -0
- package/dist/dev.js +113 -93
- package/dist/index.d.ts +3 -0
- package/dist/index.js +16 -0
- package/dist/loader/svgr.js +4 -13
- package/dist/loader/swc.js +9 -14
- package/dist/plugins/ProgressPlugin.js +3 -3
- package/dist/plugins/RuntimePublicPathPlugin.js +4 -1
- package/dist/schema.d.ts +1 -2
- package/dist/schema.js +21 -6
- package/dist/server/server.d.ts +3 -1
- package/dist/server/server.js +165 -159
- package/dist/server/ws.d.ts +7 -2
- package/dist/types.d.ts +3 -0
- package/dist/utils/getEsBuildTarget.d.ts +5 -0
- package/dist/utils/getEsBuildTarget.js +12 -0
- package/package.json +23 -21
- package/compiled/tapable/index.js +0 -1
- package/compiled/tapable/package.json +0 -1
- package/compiled/tapable/tapable.d.ts +0 -116
- package/dist/plugins/ESBuildCSSMinifyPlugin.d.ts +0 -11
- package/dist/plugins/ESBuildCSSMinifyPlugin.js +0 -63
- package/dist/plugins/ParcelCSSMinifyPlugin.d.ts +0 -10
- package/dist/plugins/ParcelCSSMinifyPlugin.js +0 -75
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Run `yarn special-lint-fix` to update
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import { Buffer } from 'buffer';
|
|
7
8
|
import {
|
|
8
9
|
ArrayExpression,
|
|
9
10
|
ArrayPattern,
|
|
@@ -63,6 +64,7 @@ import {
|
|
|
63
64
|
SimpleCallExpression,
|
|
64
65
|
SimpleLiteral,
|
|
65
66
|
SpreadElement,
|
|
67
|
+
StaticBlock,
|
|
66
68
|
Super,
|
|
67
69
|
SwitchCase,
|
|
68
70
|
SwitchStatement,
|
|
@@ -96,7 +98,7 @@ import {
|
|
|
96
98
|
SyncBailHook,
|
|
97
99
|
SyncHook,
|
|
98
100
|
SyncWaterfallHook
|
|
99
|
-
} from "tapable";
|
|
101
|
+
} from "@umijs/bundler-utils/compiled/tapable";
|
|
100
102
|
import { SecureContextOptions, TlsOptions } from 'tls';
|
|
101
103
|
|
|
102
104
|
declare class AbstractLibraryPlugin<T> {
|
|
@@ -215,6 +217,7 @@ declare interface Argument {
|
|
|
215
217
|
}
|
|
216
218
|
declare interface ArgumentConfig {
|
|
217
219
|
description: string;
|
|
220
|
+
negatedDescription?: string;
|
|
218
221
|
path: string;
|
|
219
222
|
multiple: boolean;
|
|
220
223
|
type: "string" | "number" | "boolean" | "path" | "enum" | "RegExp" | "reset";
|
|
@@ -320,6 +323,11 @@ declare interface AssetResourceGeneratorOptions {
|
|
|
320
323
|
*/
|
|
321
324
|
filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
322
325
|
|
|
326
|
+
/**
|
|
327
|
+
* Emit the asset in the specified folder relative to 'output.path'. This should only be needed when custom 'publicPath' is specified to match the folder structure there.
|
|
328
|
+
*/
|
|
329
|
+
outputPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
330
|
+
|
|
323
331
|
/**
|
|
324
332
|
* The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
|
|
325
333
|
*/
|
|
@@ -422,6 +430,11 @@ declare interface BannerPluginOptions {
|
|
|
422
430
|
*/
|
|
423
431
|
exclude?: string | RegExp | Rule[];
|
|
424
432
|
|
|
433
|
+
/**
|
|
434
|
+
* If true, banner will be placed at the end of the output.
|
|
435
|
+
*/
|
|
436
|
+
footer?: boolean;
|
|
437
|
+
|
|
425
438
|
/**
|
|
426
439
|
* Include all modules matching any of these conditions.
|
|
427
440
|
*/
|
|
@@ -466,9 +479,10 @@ declare abstract class BasicEvaluatedExpression {
|
|
|
466
479
|
prefix?: BasicEvaluatedExpression;
|
|
467
480
|
postfix?: BasicEvaluatedExpression;
|
|
468
481
|
wrappedInnerExpressions: any;
|
|
469
|
-
identifier?: string;
|
|
482
|
+
identifier?: string | VariableInfoInterface;
|
|
470
483
|
rootInfo: VariableInfoInterface;
|
|
471
484
|
getMembers: () => string[];
|
|
485
|
+
getMembersOptionals: () => boolean[];
|
|
472
486
|
expression: NodeEstreeIndex;
|
|
473
487
|
isUnknown(): boolean;
|
|
474
488
|
isNull(): boolean;
|
|
@@ -520,7 +534,8 @@ declare abstract class BasicEvaluatedExpression {
|
|
|
520
534
|
setIdentifier(
|
|
521
535
|
identifier?: any,
|
|
522
536
|
rootInfo?: any,
|
|
523
|
-
getMembers?: any
|
|
537
|
+
getMembers?: any,
|
|
538
|
+
getMembersOptionals?: any
|
|
524
539
|
): BasicEvaluatedExpression;
|
|
525
540
|
setWrapped(
|
|
526
541
|
prefix?: any,
|
|
@@ -656,7 +671,7 @@ declare interface CacheGroupsContext {
|
|
|
656
671
|
moduleGraph: ModuleGraph;
|
|
657
672
|
chunkGraph: ChunkGraph;
|
|
658
673
|
}
|
|
659
|
-
type CacheOptionsNormalized = false |
|
|
674
|
+
type CacheOptionsNormalized = false | FileCacheOptions | MemoryCacheOptions;
|
|
660
675
|
declare class CachedSource extends Source {
|
|
661
676
|
constructor(source: Source);
|
|
662
677
|
constructor(source: Source | (() => Source), cachedData?: any);
|
|
@@ -673,25 +688,26 @@ declare interface CallExpressionInfo {
|
|
|
673
688
|
getCalleeMembers: () => string[];
|
|
674
689
|
name: string;
|
|
675
690
|
getMembers: () => string[];
|
|
691
|
+
getMembersOptionals: () => boolean[];
|
|
676
692
|
}
|
|
677
693
|
declare interface CallbackAsyncQueue<T> {
|
|
678
|
-
(err?: WebpackError, result?: T): any;
|
|
694
|
+
(err?: null | WebpackError, result?: T): any;
|
|
679
695
|
}
|
|
680
696
|
declare interface CallbackCache<T> {
|
|
681
|
-
(err?: WebpackError, result?: T): void;
|
|
697
|
+
(err?: null | WebpackError, result?: T): void;
|
|
682
698
|
}
|
|
683
699
|
declare interface CallbackFunction<T> {
|
|
684
|
-
(err?: Error, result?: T): any;
|
|
700
|
+
(err?: null | Error, result?: T): any;
|
|
685
701
|
}
|
|
686
702
|
declare interface CallbackNormalErrorCache<T> {
|
|
687
|
-
(err?: Error, result?: T): void;
|
|
703
|
+
(err?: null | Error, result?: T): void;
|
|
688
704
|
}
|
|
689
705
|
declare interface CallbackWebpack<T> {
|
|
690
706
|
(err?: Error, stats?: T): void;
|
|
691
707
|
}
|
|
692
708
|
type Cell<T> = undefined | T;
|
|
693
709
|
declare class Chunk {
|
|
694
|
-
constructor(name?: string);
|
|
710
|
+
constructor(name?: string, backCompat?: boolean);
|
|
695
711
|
id: null | string | number;
|
|
696
712
|
ids: null | (string | number)[];
|
|
697
713
|
debugId: number;
|
|
@@ -702,6 +718,10 @@ declare class Chunk {
|
|
|
702
718
|
| null
|
|
703
719
|
| string
|
|
704
720
|
| ((arg0: PathData, arg1?: AssetInfo) => string);
|
|
721
|
+
cssFilenameTemplate:
|
|
722
|
+
| null
|
|
723
|
+
| string
|
|
724
|
+
| ((arg0: PathData, arg1?: AssetInfo) => string);
|
|
705
725
|
runtime: RuntimeSpec;
|
|
706
726
|
files: Set<string>;
|
|
707
727
|
auxiliaryFiles: Set<string>;
|
|
@@ -797,6 +817,13 @@ declare class ChunkGraph {
|
|
|
797
817
|
chunk: Chunk,
|
|
798
818
|
sourceType: string
|
|
799
819
|
): undefined | Iterable<Module>;
|
|
820
|
+
setChunkModuleSourceTypes(
|
|
821
|
+
chunk: Chunk,
|
|
822
|
+
module: Module,
|
|
823
|
+
sourceTypes: Set<string>
|
|
824
|
+
): void;
|
|
825
|
+
getChunkModuleSourceTypes(chunk: Chunk, module: Module): Set<string>;
|
|
826
|
+
getModuleSourceTypes(module: Module): Set<string>;
|
|
800
827
|
getOrderedChunkModulesIterable(
|
|
801
828
|
chunk: Chunk,
|
|
802
829
|
comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1
|
|
@@ -1037,6 +1064,11 @@ declare abstract class ChunkGroup {
|
|
|
1037
1064
|
}
|
|
1038
1065
|
type ChunkGroupOptions = RawChunkGroupOptions & { name?: string };
|
|
1039
1066
|
declare interface ChunkHashContext {
|
|
1067
|
+
/**
|
|
1068
|
+
* results of code generation
|
|
1069
|
+
*/
|
|
1070
|
+
codeGenerationResults: CodeGenerationResults;
|
|
1071
|
+
|
|
1040
1072
|
/**
|
|
1041
1073
|
* the runtime template
|
|
1042
1074
|
*/
|
|
@@ -1217,6 +1249,21 @@ declare interface CodeGenerationContext {
|
|
|
1217
1249
|
* when in concatenated module, information about other concatenated modules
|
|
1218
1250
|
*/
|
|
1219
1251
|
concatenationScope?: ConcatenationScope;
|
|
1252
|
+
|
|
1253
|
+
/**
|
|
1254
|
+
* code generation results of other modules (need to have a codeGenerationDependency to use that)
|
|
1255
|
+
*/
|
|
1256
|
+
codeGenerationResults: CodeGenerationResults;
|
|
1257
|
+
|
|
1258
|
+
/**
|
|
1259
|
+
* the compilation
|
|
1260
|
+
*/
|
|
1261
|
+
compilation?: Compilation;
|
|
1262
|
+
|
|
1263
|
+
/**
|
|
1264
|
+
* source types
|
|
1265
|
+
*/
|
|
1266
|
+
sourceTypes?: ReadonlySet<string>;
|
|
1220
1267
|
}
|
|
1221
1268
|
declare interface CodeGenerationResult {
|
|
1222
1269
|
/**
|
|
@@ -1393,22 +1440,22 @@ declare class Compilation {
|
|
|
1393
1440
|
additionalChunkAssets: FakeHook<
|
|
1394
1441
|
Pick<
|
|
1395
1442
|
AsyncSeriesHook<[Set<Chunk>]>,
|
|
1396
|
-
"
|
|
1443
|
+
"name" | "tap" | "tapAsync" | "tapPromise"
|
|
1397
1444
|
>
|
|
1398
1445
|
>;
|
|
1399
1446
|
additionalAssets: FakeHook<
|
|
1400
|
-
Pick<AsyncSeriesHook<[]>, "
|
|
1447
|
+
Pick<AsyncSeriesHook<[]>, "name" | "tap" | "tapAsync" | "tapPromise">
|
|
1401
1448
|
>;
|
|
1402
1449
|
optimizeChunkAssets: FakeHook<
|
|
1403
1450
|
Pick<
|
|
1404
1451
|
AsyncSeriesHook<[Set<Chunk>]>,
|
|
1405
|
-
"
|
|
1452
|
+
"name" | "tap" | "tapAsync" | "tapPromise"
|
|
1406
1453
|
>
|
|
1407
1454
|
>;
|
|
1408
1455
|
afterOptimizeChunkAssets: FakeHook<
|
|
1409
1456
|
Pick<
|
|
1410
1457
|
AsyncSeriesHook<[Set<Chunk>]>,
|
|
1411
|
-
"
|
|
1458
|
+
"name" | "tap" | "tapAsync" | "tapPromise"
|
|
1412
1459
|
>
|
|
1413
1460
|
>;
|
|
1414
1461
|
optimizeAssets: AsyncSeriesHook<
|
|
@@ -1532,7 +1579,7 @@ declare class Compilation {
|
|
|
1532
1579
|
getLogger(name: string | (() => string)): WebpackLogger;
|
|
1533
1580
|
addModule(
|
|
1534
1581
|
module: Module,
|
|
1535
|
-
callback: (err?: WebpackError, result?: Module) => void
|
|
1582
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
|
1536
1583
|
): void;
|
|
1537
1584
|
|
|
1538
1585
|
/**
|
|
@@ -1550,21 +1597,21 @@ declare class Compilation {
|
|
|
1550
1597
|
*/
|
|
1551
1598
|
buildModule(
|
|
1552
1599
|
module: Module,
|
|
1553
|
-
callback: (err?: WebpackError, result?: Module) => void
|
|
1600
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
|
1554
1601
|
): void;
|
|
1555
1602
|
processModuleDependencies(
|
|
1556
1603
|
module: Module,
|
|
1557
|
-
callback: (err?: WebpackError, result?: Module) => void
|
|
1604
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
|
1558
1605
|
): void;
|
|
1559
1606
|
processModuleDependenciesNonRecursive(module: Module): void;
|
|
1560
1607
|
handleModuleCreation(
|
|
1561
1608
|
__0: HandleModuleCreationOptions,
|
|
1562
|
-
callback: (err?: WebpackError, result?: Module) => void
|
|
1609
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
|
1563
1610
|
): void;
|
|
1564
1611
|
addModuleChain(
|
|
1565
1612
|
context: string,
|
|
1566
1613
|
dependency: Dependency,
|
|
1567
|
-
callback: (err?: WebpackError, result?: Module) => void
|
|
1614
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
|
1568
1615
|
): void;
|
|
1569
1616
|
addModuleTree(
|
|
1570
1617
|
__0: {
|
|
@@ -1581,27 +1628,27 @@ declare class Compilation {
|
|
|
1581
1628
|
*/
|
|
1582
1629
|
contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>;
|
|
1583
1630
|
},
|
|
1584
|
-
callback: (err?: WebpackError, result?: Module) => void
|
|
1631
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
|
1585
1632
|
): void;
|
|
1586
1633
|
addEntry(
|
|
1587
1634
|
context: string,
|
|
1588
1635
|
entry: Dependency,
|
|
1589
1636
|
optionsOrName: string | EntryOptions,
|
|
1590
|
-
callback: (err?: WebpackError, result?: Module) => void
|
|
1637
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
|
1591
1638
|
): void;
|
|
1592
1639
|
addInclude(
|
|
1593
1640
|
context: string,
|
|
1594
1641
|
dependency: Dependency,
|
|
1595
1642
|
options: EntryOptions,
|
|
1596
|
-
callback: (err?: WebpackError, result?: Module) => void
|
|
1643
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
|
1597
1644
|
): void;
|
|
1598
1645
|
rebuildModule(
|
|
1599
1646
|
module: Module,
|
|
1600
|
-
callback: (err?: WebpackError, result?: Module) => void
|
|
1647
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
|
1601
1648
|
): void;
|
|
1602
1649
|
finish(callback?: any): void;
|
|
1603
1650
|
unseal(): void;
|
|
1604
|
-
seal(callback: (err?: WebpackError) => void): void;
|
|
1651
|
+
seal(callback: (err?: null | WebpackError) => void): void;
|
|
1605
1652
|
reportDependencyErrorsAndWarnings(
|
|
1606
1653
|
module: Module,
|
|
1607
1654
|
blocks: DependenciesBlock[]
|
|
@@ -1634,11 +1681,15 @@ declare class Compilation {
|
|
|
1634
1681
|
module: RuntimeModule,
|
|
1635
1682
|
chunkGraph?: ChunkGraph
|
|
1636
1683
|
): void;
|
|
1684
|
+
|
|
1685
|
+
/**
|
|
1686
|
+
* If `module` is passed, `loc` and `request` must also be passed.
|
|
1687
|
+
*/
|
|
1637
1688
|
addChunkInGroup(
|
|
1638
1689
|
groupOptions: string | ChunkGroupOptions,
|
|
1639
|
-
module
|
|
1640
|
-
loc
|
|
1641
|
-
request
|
|
1690
|
+
module?: Module,
|
|
1691
|
+
loc?: SyntheticDependencyLocation | RealDependencyLocation,
|
|
1692
|
+
request?: string
|
|
1642
1693
|
): ChunkGroup;
|
|
1643
1694
|
addAsyncEntrypoint(
|
|
1644
1695
|
options: EntryOptions,
|
|
@@ -1689,7 +1740,7 @@ declare class Compilation {
|
|
|
1689
1740
|
clearAssets(): void;
|
|
1690
1741
|
createModuleAssets(): void;
|
|
1691
1742
|
getRenderManifest(options: RenderManifestOptions): RenderManifestEntry[];
|
|
1692
|
-
createChunkAssets(callback: (err?: WebpackError) => void): void;
|
|
1743
|
+
createChunkAssets(callback: (err?: null | WebpackError) => void): void;
|
|
1693
1744
|
getPath(
|
|
1694
1745
|
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
|
|
1695
1746
|
data?: PathData
|
|
@@ -1725,17 +1776,20 @@ declare class Compilation {
|
|
|
1725
1776
|
executeModule(
|
|
1726
1777
|
module: Module,
|
|
1727
1778
|
options: ExecuteModuleOptions,
|
|
1728
|
-
callback: (err?: WebpackError, result?: ExecuteModuleResult) => void
|
|
1779
|
+
callback: (err?: null | WebpackError, result?: ExecuteModuleResult) => void
|
|
1729
1780
|
): void;
|
|
1730
1781
|
checkConstraints(): void;
|
|
1731
1782
|
factorizeModule: {
|
|
1732
1783
|
(
|
|
1733
1784
|
options: FactorizeModuleOptions & { factoryResult?: false },
|
|
1734
|
-
callback: (err?: WebpackError, result?: Module) => void
|
|
1785
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
|
1735
1786
|
): void;
|
|
1736
1787
|
(
|
|
1737
1788
|
options: FactorizeModuleOptions & { factoryResult: true },
|
|
1738
|
-
callback: (
|
|
1789
|
+
callback: (
|
|
1790
|
+
err?: null | WebpackError,
|
|
1791
|
+
result?: ModuleFactoryResult
|
|
1792
|
+
) => void
|
|
1739
1793
|
): void;
|
|
1740
1794
|
};
|
|
1741
1795
|
|
|
@@ -1857,7 +1911,7 @@ declare interface CompilationParams {
|
|
|
1857
1911
|
contextModuleFactory: ContextModuleFactory;
|
|
1858
1912
|
}
|
|
1859
1913
|
declare class Compiler {
|
|
1860
|
-
constructor(context: string);
|
|
1914
|
+
constructor(context: string, options?: WebpackOptionsNormalized);
|
|
1861
1915
|
hooks: Readonly<{
|
|
1862
1916
|
initialize: SyncHook<[]>;
|
|
1863
1917
|
shouldEmit: SyncBailHook<[Compilation], boolean>;
|
|
@@ -1878,6 +1932,8 @@ declare class Compiler {
|
|
|
1878
1932
|
make: AsyncParallelHook<[Compilation]>;
|
|
1879
1933
|
finishMake: AsyncParallelHook<[Compilation]>;
|
|
1880
1934
|
afterCompile: AsyncSeriesHook<[Compilation]>;
|
|
1935
|
+
readRecords: AsyncSeriesHook<[]>;
|
|
1936
|
+
emitRecords: AsyncSeriesHook<[]>;
|
|
1881
1937
|
watchRun: AsyncSeriesHook<[Compiler]>;
|
|
1882
1938
|
failed: SyncHook<[Error]>;
|
|
1883
1939
|
invalid: SyncHook<[null | string, number]>;
|
|
@@ -1933,7 +1989,11 @@ declare class Compiler {
|
|
|
1933
1989
|
watch(watchOptions: WatchOptions, handler: CallbackFunction<Stats>): Watching;
|
|
1934
1990
|
run(callback: CallbackFunction<Stats>): void;
|
|
1935
1991
|
runAsChild(
|
|
1936
|
-
callback: (
|
|
1992
|
+
callback: (
|
|
1993
|
+
err?: null | Error,
|
|
1994
|
+
entries?: Chunk[],
|
|
1995
|
+
compilation?: Compilation
|
|
1996
|
+
) => any
|
|
1937
1997
|
): void;
|
|
1938
1998
|
purgeInputFileSystem(): void;
|
|
1939
1999
|
emitAssets(compilation: Compilation, callback: CallbackFunction<void>): void;
|
|
@@ -2028,7 +2088,7 @@ declare interface Configuration {
|
|
|
2028
2088
|
/**
|
|
2029
2089
|
* Cache generated modules and chunks to improve performance for multiple incremental builds.
|
|
2030
2090
|
*/
|
|
2031
|
-
cache?: boolean |
|
|
2091
|
+
cache?: boolean | FileCacheOptions | MemoryCacheOptions;
|
|
2032
2092
|
|
|
2033
2093
|
/**
|
|
2034
2094
|
* The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
|
|
@@ -2085,6 +2145,7 @@ declare interface Configuration {
|
|
|
2085
2145
|
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
|
|
2086
2146
|
*/
|
|
2087
2147
|
externalsType?:
|
|
2148
|
+
| "import"
|
|
2088
2149
|
| "var"
|
|
2089
2150
|
| "module"
|
|
2090
2151
|
| "assign"
|
|
@@ -2095,6 +2156,7 @@ declare interface Configuration {
|
|
|
2095
2156
|
| "commonjs"
|
|
2096
2157
|
| "commonjs2"
|
|
2097
2158
|
| "commonjs-module"
|
|
2159
|
+
| "commonjs-static"
|
|
2098
2160
|
| "amd"
|
|
2099
2161
|
| "amd-require"
|
|
2100
2162
|
| "umd"
|
|
@@ -2102,7 +2164,6 @@ declare interface Configuration {
|
|
|
2102
2164
|
| "jsonp"
|
|
2103
2165
|
| "system"
|
|
2104
2166
|
| "promise"
|
|
2105
|
-
| "import"
|
|
2106
2167
|
| "script"
|
|
2107
2168
|
| "node-commonjs";
|
|
2108
2169
|
|
|
@@ -2141,7 +2202,7 @@ declare interface Configuration {
|
|
|
2141
2202
|
/**
|
|
2142
2203
|
* Enable production optimizations or development hints.
|
|
2143
2204
|
*/
|
|
2144
|
-
mode?: "
|
|
2205
|
+
mode?: "none" | "development" | "production";
|
|
2145
2206
|
|
|
2146
2207
|
/**
|
|
2147
2208
|
* Options affecting the normal modules (`NormalModuleFactory`).
|
|
@@ -2226,15 +2287,15 @@ declare interface Configuration {
|
|
|
2226
2287
|
*/
|
|
2227
2288
|
stats?:
|
|
2228
2289
|
| boolean
|
|
2290
|
+
| StatsOptions
|
|
2229
2291
|
| "none"
|
|
2292
|
+
| "verbose"
|
|
2230
2293
|
| "summary"
|
|
2231
2294
|
| "errors-only"
|
|
2232
2295
|
| "errors-warnings"
|
|
2233
2296
|
| "minimal"
|
|
2234
2297
|
| "normal"
|
|
2235
|
-
| "detailed"
|
|
2236
|
-
| "verbose"
|
|
2237
|
-
| StatsOptions;
|
|
2298
|
+
| "detailed";
|
|
2238
2299
|
|
|
2239
2300
|
/**
|
|
2240
2301
|
* Environment to build for. An array of environments to build for all of them when possible.
|
|
@@ -2418,7 +2479,7 @@ declare interface ContainerReferencePluginOptions {
|
|
|
2418
2479
|
shareScope?: string;
|
|
2419
2480
|
}
|
|
2420
2481
|
declare abstract class ContextElementDependency extends ModuleDependency {
|
|
2421
|
-
referencedExports
|
|
2482
|
+
referencedExports?: string[][];
|
|
2422
2483
|
}
|
|
2423
2484
|
declare class ContextExclusionPlugin {
|
|
2424
2485
|
constructor(negativeMatcher: RegExp);
|
|
@@ -2441,9 +2502,9 @@ declare interface ContextHash {
|
|
|
2441
2502
|
symlinks?: Set<string>;
|
|
2442
2503
|
}
|
|
2443
2504
|
type ContextMode =
|
|
2505
|
+
| "weak"
|
|
2444
2506
|
| "sync"
|
|
2445
2507
|
| "eager"
|
|
2446
|
-
| "weak"
|
|
2447
2508
|
| "async-weak"
|
|
2448
2509
|
| "lazy"
|
|
2449
2510
|
| "lazy-once";
|
|
@@ -2455,7 +2516,7 @@ declare abstract class ContextModuleFactory extends ModuleFactory {
|
|
|
2455
2516
|
alternatives: FakeHook<
|
|
2456
2517
|
Pick<
|
|
2457
2518
|
AsyncSeriesWaterfallHook<[any[]]>,
|
|
2458
|
-
"
|
|
2519
|
+
"name" | "tap" | "tapAsync" | "tapPromise"
|
|
2459
2520
|
>
|
|
2460
2521
|
>;
|
|
2461
2522
|
alternativeRequests: AsyncSeriesWaterfallHook<
|
|
@@ -2466,7 +2527,10 @@ declare abstract class ContextModuleFactory extends ModuleFactory {
|
|
|
2466
2527
|
resolveDependencies(
|
|
2467
2528
|
fs: InputFileSystem,
|
|
2468
2529
|
options: ContextModuleOptions,
|
|
2469
|
-
callback: (
|
|
2530
|
+
callback: (
|
|
2531
|
+
err?: null | Error,
|
|
2532
|
+
dependencies?: ContextElementDependency[]
|
|
2533
|
+
) => any
|
|
2470
2534
|
): void;
|
|
2471
2535
|
}
|
|
2472
2536
|
|
|
@@ -2487,7 +2551,7 @@ declare interface ContextModuleOptions {
|
|
|
2487
2551
|
* exports referenced from modules (won't be mangled)
|
|
2488
2552
|
*/
|
|
2489
2553
|
referencedExports?: string[][];
|
|
2490
|
-
resource: string;
|
|
2554
|
+
resource: string | false | string[];
|
|
2491
2555
|
resourceQuery?: string;
|
|
2492
2556
|
resourceFragment?: string;
|
|
2493
2557
|
resolveOptions: any;
|
|
@@ -2516,6 +2580,16 @@ declare interface ContextTimestampAndHash {
|
|
|
2516
2580
|
}
|
|
2517
2581
|
type CreateStatsOptionsContext = KnownCreateStatsOptionsContext &
|
|
2518
2582
|
Record<string, any>;
|
|
2583
|
+
|
|
2584
|
+
/**
|
|
2585
|
+
* Options for css handling.
|
|
2586
|
+
*/
|
|
2587
|
+
declare interface CssExperimentOptions {
|
|
2588
|
+
/**
|
|
2589
|
+
* Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
|
|
2590
|
+
*/
|
|
2591
|
+
exportsOnly?: boolean;
|
|
2592
|
+
}
|
|
2519
2593
|
type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
|
|
2520
2594
|
declare class DefinePlugin {
|
|
2521
2595
|
/**
|
|
@@ -2582,6 +2656,13 @@ declare class Dependency {
|
|
|
2582
2656
|
readonly type: string;
|
|
2583
2657
|
readonly category: string;
|
|
2584
2658
|
loc: DependencyLocation;
|
|
2659
|
+
setLoc(
|
|
2660
|
+
startLine?: any,
|
|
2661
|
+
startColumn?: any,
|
|
2662
|
+
endLine?: any,
|
|
2663
|
+
endColumn?: any
|
|
2664
|
+
): void;
|
|
2665
|
+
getContext(): undefined | string;
|
|
2585
2666
|
getResourceIdentifier(): null | string;
|
|
2586
2667
|
couldAffectReferencingModule(): boolean | typeof TRANSITIVE;
|
|
2587
2668
|
|
|
@@ -2697,6 +2778,11 @@ declare interface DependencyTemplateContext {
|
|
|
2697
2778
|
* when in a concatenated module, information about other concatenated modules
|
|
2698
2779
|
*/
|
|
2699
2780
|
concatenationScope?: ConcatenationScope;
|
|
2781
|
+
|
|
2782
|
+
/**
|
|
2783
|
+
* the code generation results
|
|
2784
|
+
*/
|
|
2785
|
+
codeGenerationResults: CodeGenerationResults;
|
|
2700
2786
|
}
|
|
2701
2787
|
declare abstract class DependencyTemplates {
|
|
2702
2788
|
get(dependency: DependencyConstructor): DependencyTemplate;
|
|
@@ -2718,8 +2804,58 @@ declare class DeterministicChunkIdsPlugin {
|
|
|
2718
2804
|
apply(compiler: Compiler): void;
|
|
2719
2805
|
}
|
|
2720
2806
|
declare class DeterministicModuleIdsPlugin {
|
|
2721
|
-
constructor(options?:
|
|
2722
|
-
|
|
2807
|
+
constructor(options?: {
|
|
2808
|
+
/**
|
|
2809
|
+
* context relative to which module identifiers are computed
|
|
2810
|
+
*/
|
|
2811
|
+
context?: string;
|
|
2812
|
+
/**
|
|
2813
|
+
* selector function for modules
|
|
2814
|
+
*/
|
|
2815
|
+
test?: (arg0: Module) => boolean;
|
|
2816
|
+
/**
|
|
2817
|
+
* maximum id length in digits (used as starting point)
|
|
2818
|
+
*/
|
|
2819
|
+
maxLength?: number;
|
|
2820
|
+
/**
|
|
2821
|
+
* hash salt for ids
|
|
2822
|
+
*/
|
|
2823
|
+
salt?: number;
|
|
2824
|
+
/**
|
|
2825
|
+
* do not increase the maxLength to find an optimal id space size
|
|
2826
|
+
*/
|
|
2827
|
+
fixedLength?: boolean;
|
|
2828
|
+
/**
|
|
2829
|
+
* throw an error when id conflicts occur (instead of rehashing)
|
|
2830
|
+
*/
|
|
2831
|
+
failOnConflict?: boolean;
|
|
2832
|
+
});
|
|
2833
|
+
options: {
|
|
2834
|
+
/**
|
|
2835
|
+
* context relative to which module identifiers are computed
|
|
2836
|
+
*/
|
|
2837
|
+
context?: string;
|
|
2838
|
+
/**
|
|
2839
|
+
* selector function for modules
|
|
2840
|
+
*/
|
|
2841
|
+
test?: (arg0: Module) => boolean;
|
|
2842
|
+
/**
|
|
2843
|
+
* maximum id length in digits (used as starting point)
|
|
2844
|
+
*/
|
|
2845
|
+
maxLength?: number;
|
|
2846
|
+
/**
|
|
2847
|
+
* hash salt for ids
|
|
2848
|
+
*/
|
|
2849
|
+
salt?: number;
|
|
2850
|
+
/**
|
|
2851
|
+
* do not increase the maxLength to find an optimal id space size
|
|
2852
|
+
*/
|
|
2853
|
+
fixedLength?: boolean;
|
|
2854
|
+
/**
|
|
2855
|
+
* throw an error when id conflicts occur (instead of rehashing)
|
|
2856
|
+
*/
|
|
2857
|
+
failOnConflict?: boolean;
|
|
2858
|
+
};
|
|
2723
2859
|
|
|
2724
2860
|
/**
|
|
2725
2861
|
* Apply the plugin
|
|
@@ -3024,6 +3160,16 @@ declare abstract class EntryDependency extends ModuleDependency {}
|
|
|
3024
3160
|
* An object with entry point description.
|
|
3025
3161
|
*/
|
|
3026
3162
|
declare interface EntryDescription {
|
|
3163
|
+
/**
|
|
3164
|
+
* Enable/disable creating async chunks that are loaded on demand.
|
|
3165
|
+
*/
|
|
3166
|
+
asyncChunks?: boolean;
|
|
3167
|
+
|
|
3168
|
+
/**
|
|
3169
|
+
* Base uri for this entry.
|
|
3170
|
+
*/
|
|
3171
|
+
baseUri?: string;
|
|
3172
|
+
|
|
3027
3173
|
/**
|
|
3028
3174
|
* The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
|
|
3029
3175
|
*/
|
|
@@ -3074,6 +3220,16 @@ declare interface EntryDescription {
|
|
|
3074
3220
|
* An object with entry point description.
|
|
3075
3221
|
*/
|
|
3076
3222
|
declare interface EntryDescriptionNormalized {
|
|
3223
|
+
/**
|
|
3224
|
+
* Enable/disable creating async chunks that are loaded on demand.
|
|
3225
|
+
*/
|
|
3226
|
+
asyncChunks?: boolean;
|
|
3227
|
+
|
|
3228
|
+
/**
|
|
3229
|
+
* Base uri for this entry.
|
|
3230
|
+
*/
|
|
3231
|
+
baseUri?: string;
|
|
3232
|
+
|
|
3077
3233
|
/**
|
|
3078
3234
|
* The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
|
|
3079
3235
|
*/
|
|
@@ -3236,6 +3392,16 @@ declare interface Environment {
|
|
|
3236
3392
|
* The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from('...')).
|
|
3237
3393
|
*/
|
|
3238
3394
|
module?: boolean;
|
|
3395
|
+
|
|
3396
|
+
/**
|
|
3397
|
+
* The environment supports optional chaining ('obj?.a' or 'obj?.()').
|
|
3398
|
+
*/
|
|
3399
|
+
optionalChaining?: boolean;
|
|
3400
|
+
|
|
3401
|
+
/**
|
|
3402
|
+
* The environment supports template literals.
|
|
3403
|
+
*/
|
|
3404
|
+
templateLiteral?: boolean;
|
|
3239
3405
|
}
|
|
3240
3406
|
declare class EnvironmentPlugin {
|
|
3241
3407
|
constructor(...keys: any[]);
|
|
@@ -3304,14 +3470,14 @@ type Experiments = ExperimentsCommon & ExperimentsExtra;
|
|
|
3304
3470
|
*/
|
|
3305
3471
|
declare interface ExperimentsCommon {
|
|
3306
3472
|
/**
|
|
3307
|
-
*
|
|
3473
|
+
* Support WebAssembly as asynchronous EcmaScript Module.
|
|
3308
3474
|
*/
|
|
3309
|
-
|
|
3475
|
+
asyncWebAssembly?: boolean;
|
|
3310
3476
|
|
|
3311
3477
|
/**
|
|
3312
|
-
*
|
|
3478
|
+
* Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.
|
|
3313
3479
|
*/
|
|
3314
|
-
|
|
3480
|
+
backCompat?: boolean;
|
|
3315
3481
|
|
|
3316
3482
|
/**
|
|
3317
3483
|
* Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.
|
|
@@ -3324,7 +3490,7 @@ declare interface ExperimentsCommon {
|
|
|
3324
3490
|
futureDefaults?: boolean;
|
|
3325
3491
|
|
|
3326
3492
|
/**
|
|
3327
|
-
* Enable module
|
|
3493
|
+
* Enable module layers.
|
|
3328
3494
|
*/
|
|
3329
3495
|
layers?: boolean;
|
|
3330
3496
|
|
|
@@ -3353,6 +3519,11 @@ declare interface ExperimentsExtra {
|
|
|
3353
3519
|
*/
|
|
3354
3520
|
buildHttp?: HttpUriOptions | (string | RegExp | ((uri: string) => boolean))[];
|
|
3355
3521
|
|
|
3522
|
+
/**
|
|
3523
|
+
* Enable css support.
|
|
3524
|
+
*/
|
|
3525
|
+
css?: boolean | CssExperimentOptions;
|
|
3526
|
+
|
|
3356
3527
|
/**
|
|
3357
3528
|
* Compile entrypoints and import()s only when they are accessed.
|
|
3358
3529
|
*/
|
|
@@ -3369,6 +3540,11 @@ declare interface ExperimentsNormalizedExtra {
|
|
|
3369
3540
|
*/
|
|
3370
3541
|
buildHttp?: HttpUriOptions;
|
|
3371
3542
|
|
|
3543
|
+
/**
|
|
3544
|
+
* Enable css support.
|
|
3545
|
+
*/
|
|
3546
|
+
css?: CssExperimentOptions;
|
|
3547
|
+
|
|
3372
3548
|
/**
|
|
3373
3549
|
* Compile entrypoints and import()s only when they are accessed.
|
|
3374
3550
|
*/
|
|
@@ -3669,6 +3845,7 @@ declare interface ExpressionExpressionInfo {
|
|
|
3669
3845
|
rootInfo: string | VariableInfo;
|
|
3670
3846
|
name: string;
|
|
3671
3847
|
getMembers: () => string[];
|
|
3848
|
+
getMembersOptionals: () => boolean[];
|
|
3672
3849
|
}
|
|
3673
3850
|
type ExternalItem =
|
|
3674
3851
|
| string
|
|
@@ -3823,6 +4000,7 @@ declare interface ExternalsPresets {
|
|
|
3823
4000
|
webAsync?: boolean;
|
|
3824
4001
|
}
|
|
3825
4002
|
type ExternalsType =
|
|
4003
|
+
| "import"
|
|
3826
4004
|
| "var"
|
|
3827
4005
|
| "module"
|
|
3828
4006
|
| "assign"
|
|
@@ -3833,6 +4011,7 @@ type ExternalsType =
|
|
|
3833
4011
|
| "commonjs"
|
|
3834
4012
|
| "commonjs2"
|
|
3835
4013
|
| "commonjs-module"
|
|
4014
|
+
| "commonjs-static"
|
|
3836
4015
|
| "amd"
|
|
3837
4016
|
| "amd-require"
|
|
3838
4017
|
| "umd"
|
|
@@ -3840,7 +4019,6 @@ type ExternalsType =
|
|
|
3840
4019
|
| "jsonp"
|
|
3841
4020
|
| "system"
|
|
3842
4021
|
| "promise"
|
|
3843
|
-
| "import"
|
|
3844
4022
|
| "script"
|
|
3845
4023
|
| "node-commonjs";
|
|
3846
4024
|
declare interface FactorizeModuleOptions {
|
|
@@ -3859,6 +4037,7 @@ declare interface FactorizeModuleOptions {
|
|
|
3859
4037
|
type FakeHook<T> = T & FakeHookMarker;
|
|
3860
4038
|
declare interface FakeHookMarker {}
|
|
3861
4039
|
declare interface FallbackCacheGroup {
|
|
4040
|
+
chunksFilter: (chunk: Chunk) => boolean;
|
|
3862
4041
|
minSize: SplitChunksSizes;
|
|
3863
4042
|
maxAsyncSize: SplitChunksSizes;
|
|
3864
4043
|
maxInitialSize: SplitChunksSizes;
|
|
@@ -4071,40 +4250,43 @@ declare abstract class FileSystemInfo {
|
|
|
4071
4250
|
getFileTimestamp(
|
|
4072
4251
|
path: string,
|
|
4073
4252
|
callback: (
|
|
4074
|
-
arg0?: WebpackError,
|
|
4253
|
+
arg0?: null | WebpackError,
|
|
4075
4254
|
arg1?: null | FileSystemInfoEntry | "ignore"
|
|
4076
4255
|
) => void
|
|
4077
4256
|
): void;
|
|
4078
4257
|
getContextTimestamp(
|
|
4079
4258
|
path: string,
|
|
4080
4259
|
callback: (
|
|
4081
|
-
arg0?: WebpackError,
|
|
4260
|
+
arg0?: null | WebpackError,
|
|
4082
4261
|
arg1?: null | "ignore" | ResolvedContextFileSystemInfoEntry
|
|
4083
4262
|
) => void
|
|
4084
4263
|
): void;
|
|
4085
4264
|
getFileHash(
|
|
4086
4265
|
path: string,
|
|
4087
|
-
callback: (arg0?: WebpackError, arg1?: string) => void
|
|
4266
|
+
callback: (arg0?: null | WebpackError, arg1?: string) => void
|
|
4088
4267
|
): void;
|
|
4089
4268
|
getContextHash(
|
|
4090
4269
|
path: string,
|
|
4091
|
-
callback: (arg0?: WebpackError, arg1?: string) => void
|
|
4270
|
+
callback: (arg0?: null | WebpackError, arg1?: string) => void
|
|
4092
4271
|
): void;
|
|
4093
4272
|
getContextTsh(
|
|
4094
4273
|
path: string,
|
|
4095
4274
|
callback: (
|
|
4096
|
-
arg0?: WebpackError,
|
|
4275
|
+
arg0?: null | WebpackError,
|
|
4097
4276
|
arg1?: ResolvedContextTimestampAndHash
|
|
4098
4277
|
) => void
|
|
4099
4278
|
): void;
|
|
4100
4279
|
resolveBuildDependencies(
|
|
4101
4280
|
context: string,
|
|
4102
4281
|
deps: Iterable<string>,
|
|
4103
|
-
callback: (
|
|
4282
|
+
callback: (
|
|
4283
|
+
arg0?: null | Error,
|
|
4284
|
+
arg1?: ResolveBuildDependenciesResult
|
|
4285
|
+
) => void
|
|
4104
4286
|
): void;
|
|
4105
4287
|
checkResolveResultsValid(
|
|
4106
4288
|
resolveResults: Map<string, string | false>,
|
|
4107
|
-
callback: (arg0?: Error, arg1?: boolean) => void
|
|
4289
|
+
callback: (arg0?: null | Error, arg1?: boolean) => void
|
|
4108
4290
|
): void;
|
|
4109
4291
|
createSnapshot(
|
|
4110
4292
|
startTime: number,
|
|
@@ -4121,12 +4303,12 @@ declare abstract class FileSystemInfo {
|
|
|
4121
4303
|
*/
|
|
4122
4304
|
timestamp?: boolean;
|
|
4123
4305
|
},
|
|
4124
|
-
callback: (arg0?: WebpackError, arg1?: Snapshot) => void
|
|
4306
|
+
callback: (arg0?: null | WebpackError, arg1?: null | Snapshot) => void
|
|
4125
4307
|
): void;
|
|
4126
4308
|
mergeSnapshots(snapshot1: Snapshot, snapshot2: Snapshot): Snapshot;
|
|
4127
4309
|
checkSnapshotValid(
|
|
4128
4310
|
snapshot: Snapshot,
|
|
4129
|
-
callback: (arg0?: WebpackError, arg1?: boolean) => void
|
|
4311
|
+
callback: (arg0?: null | WebpackError, arg1?: boolean) => void
|
|
4130
4312
|
): void;
|
|
4131
4313
|
getDeprecatedFileTimestamps(): Map<any, any>;
|
|
4132
4314
|
getDeprecatedContextTimestamps(): Map<any, any>;
|
|
@@ -4176,6 +4358,11 @@ declare interface GenerateContext {
|
|
|
4176
4358
|
*/
|
|
4177
4359
|
concatenationScope?: ConcatenationScope;
|
|
4178
4360
|
|
|
4361
|
+
/**
|
|
4362
|
+
* code generation results of other modules (need to have a codeGenerationDependency to use that)
|
|
4363
|
+
*/
|
|
4364
|
+
codeGenerationResults?: CodeGenerationResults;
|
|
4365
|
+
|
|
4179
4366
|
/**
|
|
4180
4367
|
* which kind of code should be generated
|
|
4181
4368
|
*/
|
|
@@ -4319,12 +4506,12 @@ declare class Hash {
|
|
|
4319
4506
|
constructor();
|
|
4320
4507
|
|
|
4321
4508
|
/**
|
|
4322
|
-
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
|
4509
|
+
* Update hash {@link https ://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
|
4323
4510
|
*/
|
|
4324
4511
|
update(data: string | Buffer, inputEncoding?: string): Hash;
|
|
4325
4512
|
|
|
4326
4513
|
/**
|
|
4327
|
-
* Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
|
|
4514
|
+
* Calculates the digest {@link https ://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
|
|
4328
4515
|
*/
|
|
4329
4516
|
digest(encoding?: string): string | Buffer;
|
|
4330
4517
|
}
|
|
@@ -4345,7 +4532,7 @@ declare interface HashedModuleIdsPluginOptions {
|
|
|
4345
4532
|
/**
|
|
4346
4533
|
* The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.
|
|
4347
4534
|
*/
|
|
4348
|
-
hashDigest?: "
|
|
4535
|
+
hashDigest?: "latin1" | "hex" | "base64";
|
|
4349
4536
|
|
|
4350
4537
|
/**
|
|
4351
4538
|
* The prefix length of the hash digest to use, defaults to 4.
|
|
@@ -4403,6 +4590,11 @@ declare interface HttpUriOptions {
|
|
|
4403
4590
|
*/
|
|
4404
4591
|
lockfileLocation?: string;
|
|
4405
4592
|
|
|
4593
|
+
/**
|
|
4594
|
+
* Proxy configuration, which can be used to specify a proxy server to use for HTTP requests.
|
|
4595
|
+
*/
|
|
4596
|
+
proxy?: string;
|
|
4597
|
+
|
|
4406
4598
|
/**
|
|
4407
4599
|
* When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.
|
|
4408
4600
|
*/
|
|
@@ -4495,6 +4687,11 @@ declare interface ImportModuleOptions {
|
|
|
4495
4687
|
* the target public path
|
|
4496
4688
|
*/
|
|
4497
4689
|
publicPath?: string;
|
|
4690
|
+
|
|
4691
|
+
/**
|
|
4692
|
+
* target base uri
|
|
4693
|
+
*/
|
|
4694
|
+
baseUri?: string;
|
|
4498
4695
|
}
|
|
4499
4696
|
type ImportSource =
|
|
4500
4697
|
| undefined
|
|
@@ -4536,7 +4733,7 @@ declare interface InfrastructureLogging {
|
|
|
4536
4733
|
/**
|
|
4537
4734
|
* Log level.
|
|
4538
4735
|
*/
|
|
4539
|
-
level?: "none" | "
|
|
4736
|
+
level?: "none" | "error" | "warn" | "info" | "log" | "verbose";
|
|
4540
4737
|
|
|
4541
4738
|
/**
|
|
4542
4739
|
* Stream used for logging output. Defaults to process.stderr. This option is only used when no custom console is provided.
|
|
@@ -4682,7 +4879,7 @@ declare class JavascriptModulesPlugin {
|
|
|
4682
4879
|
static chunkHasJs: (chunk: Chunk, chunkGraph: ChunkGraph) => boolean;
|
|
4683
4880
|
}
|
|
4684
4881
|
declare class JavascriptParser extends Parser {
|
|
4685
|
-
constructor(sourceType?: "module" | "
|
|
4882
|
+
constructor(sourceType?: "module" | "auto" | "script");
|
|
4686
4883
|
hooks: Readonly<{
|
|
4687
4884
|
evaluateTypeof: HookMap<
|
|
4688
4885
|
SyncBailHook<
|
|
@@ -4759,6 +4956,7 @@ declare class JavascriptParser extends Parser {
|
|
|
4759
4956
|
| ClassDeclaration
|
|
4760
4957
|
| ExpressionStatement
|
|
4761
4958
|
| BlockStatement
|
|
4959
|
+
| StaticBlock
|
|
4762
4960
|
| EmptyStatement
|
|
4763
4961
|
| DebuggerStatement
|
|
4764
4962
|
| WithStatement
|
|
@@ -4789,6 +4987,7 @@ declare class JavascriptParser extends Parser {
|
|
|
4789
4987
|
| ClassDeclaration
|
|
4790
4988
|
| ExpressionStatement
|
|
4791
4989
|
| BlockStatement
|
|
4990
|
+
| StaticBlock
|
|
4792
4991
|
| EmptyStatement
|
|
4793
4992
|
| DebuggerStatement
|
|
4794
4993
|
| WithStatement
|
|
@@ -4819,6 +5018,7 @@ declare class JavascriptParser extends Parser {
|
|
|
4819
5018
|
| ClassDeclaration
|
|
4820
5019
|
| ExpressionStatement
|
|
4821
5020
|
| BlockStatement
|
|
5021
|
+
| StaticBlock
|
|
4822
5022
|
| EmptyStatement
|
|
4823
5023
|
| DebuggerStatement
|
|
4824
5024
|
| WithStatement
|
|
@@ -4924,7 +5124,7 @@ declare class JavascriptParser extends Parser {
|
|
|
4924
5124
|
topLevelAwait: SyncBailHook<[Expression], boolean | void>;
|
|
4925
5125
|
call: HookMap<SyncBailHook<[Expression], boolean | void>>;
|
|
4926
5126
|
callMemberChain: HookMap<
|
|
4927
|
-
SyncBailHook<[CallExpression, string[]], boolean | void>
|
|
5127
|
+
SyncBailHook<[CallExpression, string[], boolean[]], boolean | void>
|
|
4928
5128
|
>;
|
|
4929
5129
|
memberChainOfCallMemberChain: HookMap<
|
|
4930
5130
|
SyncBailHook<
|
|
@@ -4940,9 +5140,10 @@ declare class JavascriptParser extends Parser {
|
|
|
4940
5140
|
>;
|
|
4941
5141
|
optionalChaining: SyncBailHook<[ChainExpression], boolean | void>;
|
|
4942
5142
|
new: HookMap<SyncBailHook<[NewExpression], boolean | void>>;
|
|
5143
|
+
binaryExpression: SyncBailHook<[BinaryExpression], boolean | void>;
|
|
4943
5144
|
expression: HookMap<SyncBailHook<[Expression], boolean | void>>;
|
|
4944
5145
|
expressionMemberChain: HookMap<
|
|
4945
|
-
SyncBailHook<[Expression, string[]], boolean | void>
|
|
5146
|
+
SyncBailHook<[Expression, string[], boolean[]], boolean | void>
|
|
4946
5147
|
>;
|
|
4947
5148
|
unhandledExpressionMemberChain: HookMap<
|
|
4948
5149
|
SyncBailHook<[Expression, string[]], boolean | void>
|
|
@@ -4952,7 +5153,7 @@ declare class JavascriptParser extends Parser {
|
|
|
4952
5153
|
program: SyncBailHook<[Program, Comment[]], boolean | void>;
|
|
4953
5154
|
finish: SyncBailHook<[Program, Comment[]], boolean | void>;
|
|
4954
5155
|
}>;
|
|
4955
|
-
sourceType: "module" | "
|
|
5156
|
+
sourceType: "module" | "auto" | "script";
|
|
4956
5157
|
scope: ScopeInfo;
|
|
4957
5158
|
state: ParserState;
|
|
4958
5159
|
comments: any;
|
|
@@ -4990,6 +5191,7 @@ declare class JavascriptParser extends Parser {
|
|
|
4990
5191
|
| ClassDeclaration
|
|
4991
5192
|
| ExpressionStatement
|
|
4992
5193
|
| BlockStatement
|
|
5194
|
+
| StaticBlock
|
|
4993
5195
|
| EmptyStatement
|
|
4994
5196
|
| DebuggerStatement
|
|
4995
5197
|
| WithStatement
|
|
@@ -5009,7 +5211,7 @@ declare class JavascriptParser extends Parser {
|
|
|
5009
5211
|
)[];
|
|
5010
5212
|
prevStatement: any;
|
|
5011
5213
|
currentTagData: any;
|
|
5012
|
-
getRenameIdentifier(expr?: any): undefined | string;
|
|
5214
|
+
getRenameIdentifier(expr?: any): undefined | string | VariableInfoInterface;
|
|
5013
5215
|
walkClass(classy: ClassExpression | ClassDeclaration): void;
|
|
5014
5216
|
preWalkStatements(statements?: any): void;
|
|
5015
5217
|
blockPreWalkStatements(statements?: any): void;
|
|
@@ -5156,12 +5358,10 @@ declare class JavascriptParser extends Parser {
|
|
|
5156
5358
|
enterArrayPattern(pattern?: any, onIdent?: any): void;
|
|
5157
5359
|
enterRestElement(pattern?: any, onIdent?: any): void;
|
|
5158
5360
|
enterAssignmentPattern(pattern?: any, onIdent?: any): void;
|
|
5159
|
-
evaluateExpression(
|
|
5160
|
-
expression: Expression
|
|
5161
|
-
): undefined | BasicEvaluatedExpression;
|
|
5361
|
+
evaluateExpression(expression: Expression): BasicEvaluatedExpression;
|
|
5162
5362
|
parseString(expression?: any): any;
|
|
5163
5363
|
parseCalculatedString(expression?: any): any;
|
|
5164
|
-
evaluate(source
|
|
5364
|
+
evaluate(source: string): BasicEvaluatedExpression;
|
|
5165
5365
|
isPure(
|
|
5166
5366
|
expr:
|
|
5167
5367
|
| undefined
|
|
@@ -5212,7 +5412,7 @@ declare class JavascriptParser extends Parser {
|
|
|
5212
5412
|
setVariable(name: string, variableInfo: ExportedVariableInfo): void;
|
|
5213
5413
|
parseCommentOptions(
|
|
5214
5414
|
range?: any
|
|
5215
|
-
): { options: null; errors: null } | { options: object; errors:
|
|
5415
|
+
): { options: null; errors: null } | { options: object; errors: unknown[] };
|
|
5216
5416
|
extractMemberExpressionChain(expression: MemberExpression): {
|
|
5217
5417
|
members: string[];
|
|
5218
5418
|
object:
|
|
@@ -5244,6 +5444,7 @@ declare class JavascriptParser extends Parser {
|
|
|
5244
5444
|
| ImportExpression
|
|
5245
5445
|
| ChainExpression
|
|
5246
5446
|
| Super;
|
|
5447
|
+
membersOptionals: boolean[];
|
|
5247
5448
|
};
|
|
5248
5449
|
getFreeInfoFromVariable(varName: string): {
|
|
5249
5450
|
name: string;
|
|
@@ -5289,6 +5490,11 @@ declare interface JavascriptParserOptions {
|
|
|
5289
5490
|
*/
|
|
5290
5491
|
commonjsMagicComments?: boolean;
|
|
5291
5492
|
|
|
5493
|
+
/**
|
|
5494
|
+
* Specifies the behavior of invalid export names in "import ... from ..." and "export ... from ...".
|
|
5495
|
+
*/
|
|
5496
|
+
exportsPresence?: false | "auto" | "error" | "warn";
|
|
5497
|
+
|
|
5292
5498
|
/**
|
|
5293
5499
|
* Enable warnings for full dynamic dependencies.
|
|
5294
5500
|
*/
|
|
@@ -5319,11 +5525,31 @@ declare interface JavascriptParserOptions {
|
|
|
5319
5525
|
*/
|
|
5320
5526
|
import?: boolean;
|
|
5321
5527
|
|
|
5528
|
+
/**
|
|
5529
|
+
* Specifies the behavior of invalid export names in "import ... from ...".
|
|
5530
|
+
*/
|
|
5531
|
+
importExportsPresence?: false | "auto" | "error" | "warn";
|
|
5532
|
+
|
|
5533
|
+
/**
|
|
5534
|
+
* Enable/disable evaluating import.meta.
|
|
5535
|
+
*/
|
|
5536
|
+
importMeta?: boolean;
|
|
5537
|
+
|
|
5538
|
+
/**
|
|
5539
|
+
* Enable/disable evaluating import.meta.webpackContext.
|
|
5540
|
+
*/
|
|
5541
|
+
importMetaContext?: boolean;
|
|
5542
|
+
|
|
5322
5543
|
/**
|
|
5323
5544
|
* Include polyfills or mocks for various node stuff.
|
|
5324
5545
|
*/
|
|
5325
5546
|
node?: false | NodeOptions;
|
|
5326
5547
|
|
|
5548
|
+
/**
|
|
5549
|
+
* Specifies the behavior of invalid export names in "export ... from ...". This might be useful to disable during the migration from "export ... from ..." to "export type ... from ..." when reexporting types in TypeScript.
|
|
5550
|
+
*/
|
|
5551
|
+
reexportExportsPresence?: false | "auto" | "error" | "warn";
|
|
5552
|
+
|
|
5327
5553
|
/**
|
|
5328
5554
|
* Enable/disable parsing of require.context syntax.
|
|
5329
5555
|
*/
|
|
@@ -5345,7 +5571,7 @@ declare interface JavascriptParserOptions {
|
|
|
5345
5571
|
requireJs?: boolean;
|
|
5346
5572
|
|
|
5347
5573
|
/**
|
|
5348
|
-
* Emit errors instead of warnings when imported names don't exist in imported module.
|
|
5574
|
+
* Deprecated in favor of "exportsPresence". Emit errors instead of warnings when imported names don't exist in imported module.
|
|
5349
5575
|
*/
|
|
5350
5576
|
strictExportPresence?: boolean;
|
|
5351
5577
|
|
|
@@ -5559,7 +5785,7 @@ declare interface KnownNormalizedStatsOptions {
|
|
|
5559
5785
|
modulesSpace: number;
|
|
5560
5786
|
chunkModulesSpace: number;
|
|
5561
5787
|
nestedModulesSpace: number;
|
|
5562
|
-
logging: false | "none" | "
|
|
5788
|
+
logging: false | "none" | "error" | "warn" | "info" | "log" | "verbose";
|
|
5563
5789
|
loggingDebug: ((value: string) => boolean)[];
|
|
5564
5790
|
loggingTrace: boolean;
|
|
5565
5791
|
}
|
|
@@ -5871,9 +6097,8 @@ declare class LazySet<T> {
|
|
|
5871
6097
|
has(item: T): boolean;
|
|
5872
6098
|
keys(): IterableIterator<T>;
|
|
5873
6099
|
values(): IterableIterator<T>;
|
|
5874
|
-
[Symbol.iterator](): IterableIterator<T>;
|
|
5875
|
-
readonly [Symbol.toStringTag]: string;
|
|
5876
6100
|
serialize(__0: { write: any }): void;
|
|
6101
|
+
[Symbol.iterator](): IterableIterator<T>;
|
|
5877
6102
|
static deserialize(__0: { read: any }): LazySet<any>;
|
|
5878
6103
|
}
|
|
5879
6104
|
declare interface LibIdentOptions {
|
|
@@ -5969,7 +6194,7 @@ declare interface LibraryOptions {
|
|
|
5969
6194
|
name?: string | string[] | LibraryCustomUmdObject;
|
|
5970
6195
|
|
|
5971
6196
|
/**
|
|
5972
|
-
* 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).
|
|
6197
|
+
* Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
|
|
5973
6198
|
*/
|
|
5974
6199
|
type: string;
|
|
5975
6200
|
|
|
@@ -6151,7 +6376,7 @@ declare interface LoaderPluginLoaderContext {
|
|
|
6151
6376
|
importModule(
|
|
6152
6377
|
request: string,
|
|
6153
6378
|
options: ImportModuleOptions,
|
|
6154
|
-
callback: (err?: Error, exports?: any) => any
|
|
6379
|
+
callback: (err?: null | Error, exports?: any) => any
|
|
6155
6380
|
): void;
|
|
6156
6381
|
importModule(request: string, options?: ImportModuleOptions): Promise<any>;
|
|
6157
6382
|
}
|
|
@@ -6456,6 +6681,7 @@ declare class Module extends DependenciesBlock {
|
|
|
6456
6681
|
buildMeta: BuildMeta;
|
|
6457
6682
|
buildInfo: Record<string, any>;
|
|
6458
6683
|
presentationalDependencies?: Dependency[];
|
|
6684
|
+
codeGenerationDependencies?: Dependency[];
|
|
6459
6685
|
id: string | number;
|
|
6460
6686
|
readonly hash: string;
|
|
6461
6687
|
readonly renderedHash: string;
|
|
@@ -6485,6 +6711,7 @@ declare class Module extends DependenciesBlock {
|
|
|
6485
6711
|
strict: boolean
|
|
6486
6712
|
): "namespace" | "default-only" | "default-with-named" | "dynamic";
|
|
6487
6713
|
addPresentationalDependency(presentationalDependency: Dependency): void;
|
|
6714
|
+
addCodeGenerationDependency(codeGenerationDependency: Dependency): void;
|
|
6488
6715
|
addWarning(warning: WebpackError): void;
|
|
6489
6716
|
getWarnings(): undefined | Iterable<WebpackError>;
|
|
6490
6717
|
getNumberOfWarnings(): number;
|
|
@@ -6515,7 +6742,7 @@ declare class Module extends DependenciesBlock {
|
|
|
6515
6742
|
hasReasons(moduleGraph: ModuleGraph, runtime: RuntimeSpec): boolean;
|
|
6516
6743
|
needBuild(
|
|
6517
6744
|
context: NeedBuildContext,
|
|
6518
|
-
callback: (arg0?: WebpackError, arg1?: boolean) => void
|
|
6745
|
+
callback: (arg0?: null | WebpackError, arg1?: boolean) => void
|
|
6519
6746
|
): void;
|
|
6520
6747
|
needRebuild(
|
|
6521
6748
|
fileTimestamps: Map<string, null | number>,
|
|
@@ -6662,6 +6889,7 @@ declare interface ModuleFederationPluginOptions {
|
|
|
6662
6889
|
* The external type of the remote containers.
|
|
6663
6890
|
*/
|
|
6664
6891
|
remoteType?:
|
|
6892
|
+
| "import"
|
|
6665
6893
|
| "var"
|
|
6666
6894
|
| "module"
|
|
6667
6895
|
| "assign"
|
|
@@ -6672,6 +6900,7 @@ declare interface ModuleFederationPluginOptions {
|
|
|
6672
6900
|
| "commonjs"
|
|
6673
6901
|
| "commonjs2"
|
|
6674
6902
|
| "commonjs-module"
|
|
6903
|
+
| "commonjs-static"
|
|
6675
6904
|
| "amd"
|
|
6676
6905
|
| "amd-require"
|
|
6677
6906
|
| "umd"
|
|
@@ -6679,7 +6908,6 @@ declare interface ModuleFederationPluginOptions {
|
|
|
6679
6908
|
| "jsonp"
|
|
6680
6909
|
| "system"
|
|
6681
6910
|
| "promise"
|
|
6682
|
-
| "import"
|
|
6683
6911
|
| "script"
|
|
6684
6912
|
| "node-commonjs";
|
|
6685
6913
|
|
|
@@ -7060,6 +7288,37 @@ declare interface ModuleReferenceOptions {
|
|
|
7060
7288
|
*/
|
|
7061
7289
|
asiSafe?: boolean;
|
|
7062
7290
|
}
|
|
7291
|
+
declare interface ModuleSettings {
|
|
7292
|
+
/**
|
|
7293
|
+
* Specifies the layer in which the module should be placed in.
|
|
7294
|
+
*/
|
|
7295
|
+
layer?: string;
|
|
7296
|
+
|
|
7297
|
+
/**
|
|
7298
|
+
* Module type to use for the module.
|
|
7299
|
+
*/
|
|
7300
|
+
type?: string;
|
|
7301
|
+
|
|
7302
|
+
/**
|
|
7303
|
+
* Options for the resolver.
|
|
7304
|
+
*/
|
|
7305
|
+
resolve?: ResolveOptionsWebpackOptions;
|
|
7306
|
+
|
|
7307
|
+
/**
|
|
7308
|
+
* Options for parsing.
|
|
7309
|
+
*/
|
|
7310
|
+
parser?: { [index: string]: any };
|
|
7311
|
+
|
|
7312
|
+
/**
|
|
7313
|
+
* The options for the module generator.
|
|
7314
|
+
*/
|
|
7315
|
+
generator?: { [index: string]: any };
|
|
7316
|
+
|
|
7317
|
+
/**
|
|
7318
|
+
* Flags a module as with or without side effects.
|
|
7319
|
+
*/
|
|
7320
|
+
sideEffects?: boolean;
|
|
7321
|
+
}
|
|
7063
7322
|
declare abstract class ModuleTemplate {
|
|
7064
7323
|
type: string;
|
|
7065
7324
|
hooks: Readonly<{
|
|
@@ -7224,6 +7483,7 @@ type NodeEstreeIndex =
|
|
|
7224
7483
|
| PrivateIdentifier
|
|
7225
7484
|
| ExpressionStatement
|
|
7226
7485
|
| BlockStatement
|
|
7486
|
+
| StaticBlock
|
|
7227
7487
|
| EmptyStatement
|
|
7228
7488
|
| DebuggerStatement
|
|
7229
7489
|
| WithStatement
|
|
@@ -7248,11 +7508,11 @@ type NodeEstreeIndex =
|
|
|
7248
7508
|
| PropertyDefinition
|
|
7249
7509
|
| VariableDeclarator
|
|
7250
7510
|
| Program
|
|
7251
|
-
| Super
|
|
7252
7511
|
| SwitchCase
|
|
7253
7512
|
| CatchClause
|
|
7254
7513
|
| Property
|
|
7255
7514
|
| AssignmentProperty
|
|
7515
|
+
| Super
|
|
7256
7516
|
| TemplateElement
|
|
7257
7517
|
| SpreadElement
|
|
7258
7518
|
| ObjectPattern
|
|
@@ -7310,81 +7570,20 @@ declare class NodeTemplatePlugin {
|
|
|
7310
7570
|
}
|
|
7311
7571
|
type NodeWebpackOptions = false | NodeOptions;
|
|
7312
7572
|
declare class NormalModule extends Module {
|
|
7313
|
-
constructor(__0:
|
|
7314
|
-
/**
|
|
7315
|
-
* an optional layer in which the module is
|
|
7316
|
-
*/
|
|
7317
|
-
layer?: string;
|
|
7318
|
-
/**
|
|
7319
|
-
* module type
|
|
7320
|
-
*/
|
|
7321
|
-
type: string;
|
|
7322
|
-
/**
|
|
7323
|
-
* request string
|
|
7324
|
-
*/
|
|
7325
|
-
request: string;
|
|
7326
|
-
/**
|
|
7327
|
-
* request intended by user (without loaders from config)
|
|
7328
|
-
*/
|
|
7329
|
-
userRequest: string;
|
|
7330
|
-
/**
|
|
7331
|
-
* request without resolving
|
|
7332
|
-
*/
|
|
7333
|
-
rawRequest: string;
|
|
7334
|
-
/**
|
|
7335
|
-
* list of loaders
|
|
7336
|
-
*/
|
|
7337
|
-
loaders: LoaderItem[];
|
|
7338
|
-
/**
|
|
7339
|
-
* path + query of the real resource
|
|
7340
|
-
*/
|
|
7341
|
-
resource: string;
|
|
7342
|
-
/**
|
|
7343
|
-
* resource resolve data
|
|
7344
|
-
*/
|
|
7345
|
-
resourceResolveData?: Record<string, any>;
|
|
7346
|
-
/**
|
|
7347
|
-
* context directory for resolving
|
|
7348
|
-
*/
|
|
7349
|
-
context: string;
|
|
7350
|
-
/**
|
|
7351
|
-
* path + query of the matched resource (virtual)
|
|
7352
|
-
*/
|
|
7353
|
-
matchResource?: string;
|
|
7354
|
-
/**
|
|
7355
|
-
* the parser used
|
|
7356
|
-
*/
|
|
7357
|
-
parser: Parser;
|
|
7358
|
-
/**
|
|
7359
|
-
* the options of the parser used
|
|
7360
|
-
*/
|
|
7361
|
-
parserOptions: object;
|
|
7362
|
-
/**
|
|
7363
|
-
* the generator used
|
|
7364
|
-
*/
|
|
7365
|
-
generator: Generator;
|
|
7366
|
-
/**
|
|
7367
|
-
* the options of the generator used
|
|
7368
|
-
*/
|
|
7369
|
-
generatorOptions: object;
|
|
7370
|
-
/**
|
|
7371
|
-
* options used for resolving requests from this module
|
|
7372
|
-
*/
|
|
7373
|
-
resolveOptions: Object;
|
|
7374
|
-
});
|
|
7573
|
+
constructor(__0: NormalModuleCreateData);
|
|
7375
7574
|
request: string;
|
|
7376
7575
|
userRequest: string;
|
|
7377
7576
|
rawRequest: string;
|
|
7378
7577
|
binary: boolean;
|
|
7379
7578
|
parser: Parser;
|
|
7380
|
-
parserOptions
|
|
7579
|
+
parserOptions?: Record<string, any>;
|
|
7381
7580
|
generator: Generator;
|
|
7382
|
-
generatorOptions
|
|
7581
|
+
generatorOptions?: Record<string, any>;
|
|
7383
7582
|
resource: string;
|
|
7384
7583
|
resourceResolveData?: Record<string, any>;
|
|
7385
7584
|
matchResource?: string;
|
|
7386
7585
|
loaders: LoaderItem[];
|
|
7387
|
-
error?: WebpackError;
|
|
7586
|
+
error?: null | WebpackError;
|
|
7388
7587
|
restoreFromUnsafeCache(
|
|
7389
7588
|
unsafeCacheData?: any,
|
|
7390
7589
|
normalModuleFactory?: any
|
|
@@ -7422,20 +7621,109 @@ declare interface NormalModuleCompilationHooks {
|
|
|
7422
7621
|
readResource: HookMap<AsyncSeriesBailHook<[object], string | Buffer>>;
|
|
7423
7622
|
needBuild: AsyncSeriesBailHook<[NormalModule, NeedBuildContext], boolean>;
|
|
7424
7623
|
}
|
|
7624
|
+
declare interface NormalModuleCreateData {
|
|
7625
|
+
/**
|
|
7626
|
+
* an optional layer in which the module is
|
|
7627
|
+
*/
|
|
7628
|
+
layer?: string;
|
|
7629
|
+
|
|
7630
|
+
/**
|
|
7631
|
+
* module type
|
|
7632
|
+
*/
|
|
7633
|
+
type: string;
|
|
7634
|
+
|
|
7635
|
+
/**
|
|
7636
|
+
* request string
|
|
7637
|
+
*/
|
|
7638
|
+
request: string;
|
|
7639
|
+
|
|
7640
|
+
/**
|
|
7641
|
+
* request intended by user (without loaders from config)
|
|
7642
|
+
*/
|
|
7643
|
+
userRequest: string;
|
|
7644
|
+
|
|
7645
|
+
/**
|
|
7646
|
+
* request without resolving
|
|
7647
|
+
*/
|
|
7648
|
+
rawRequest: string;
|
|
7649
|
+
|
|
7650
|
+
/**
|
|
7651
|
+
* list of loaders
|
|
7652
|
+
*/
|
|
7653
|
+
loaders: LoaderItem[];
|
|
7654
|
+
|
|
7655
|
+
/**
|
|
7656
|
+
* path + query of the real resource
|
|
7657
|
+
*/
|
|
7658
|
+
resource: string;
|
|
7659
|
+
|
|
7660
|
+
/**
|
|
7661
|
+
* resource resolve data
|
|
7662
|
+
*/
|
|
7663
|
+
resourceResolveData?: Record<string, any>;
|
|
7664
|
+
|
|
7665
|
+
/**
|
|
7666
|
+
* context directory for resolving
|
|
7667
|
+
*/
|
|
7668
|
+
context: string;
|
|
7669
|
+
|
|
7670
|
+
/**
|
|
7671
|
+
* path + query of the matched resource (virtual)
|
|
7672
|
+
*/
|
|
7673
|
+
matchResource?: string;
|
|
7674
|
+
|
|
7675
|
+
/**
|
|
7676
|
+
* the parser used
|
|
7677
|
+
*/
|
|
7678
|
+
parser: Parser;
|
|
7679
|
+
|
|
7680
|
+
/**
|
|
7681
|
+
* the options of the parser used
|
|
7682
|
+
*/
|
|
7683
|
+
parserOptions?: Record<string, any>;
|
|
7684
|
+
|
|
7685
|
+
/**
|
|
7686
|
+
* the generator used
|
|
7687
|
+
*/
|
|
7688
|
+
generator: Generator;
|
|
7689
|
+
|
|
7690
|
+
/**
|
|
7691
|
+
* the options of the generator used
|
|
7692
|
+
*/
|
|
7693
|
+
generatorOptions?: Record<string, any>;
|
|
7694
|
+
|
|
7695
|
+
/**
|
|
7696
|
+
* options used for resolving requests from this module
|
|
7697
|
+
*/
|
|
7698
|
+
resolveOptions?: ResolveOptionsWebpackOptions;
|
|
7699
|
+
}
|
|
7425
7700
|
declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
7426
7701
|
hooks: Readonly<{
|
|
7427
|
-
resolve: AsyncSeriesBailHook<[ResolveData],
|
|
7702
|
+
resolve: AsyncSeriesBailHook<[ResolveData], false | void | Module>;
|
|
7428
7703
|
resolveForScheme: HookMap<
|
|
7429
7704
|
AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
|
|
7430
7705
|
>;
|
|
7431
7706
|
resolveInScheme: HookMap<
|
|
7432
7707
|
AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
|
|
7433
7708
|
>;
|
|
7434
|
-
factorize: AsyncSeriesBailHook<[ResolveData],
|
|
7435
|
-
beforeResolve: AsyncSeriesBailHook<[ResolveData],
|
|
7436
|
-
afterResolve: AsyncSeriesBailHook<[ResolveData],
|
|
7437
|
-
createModule: AsyncSeriesBailHook<
|
|
7438
|
-
|
|
7709
|
+
factorize: AsyncSeriesBailHook<[ResolveData], Module>;
|
|
7710
|
+
beforeResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
|
|
7711
|
+
afterResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
|
|
7712
|
+
createModule: AsyncSeriesBailHook<
|
|
7713
|
+
[
|
|
7714
|
+
Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
|
|
7715
|
+
ResolveData
|
|
7716
|
+
],
|
|
7717
|
+
void | Module
|
|
7718
|
+
>;
|
|
7719
|
+
module: SyncWaterfallHook<
|
|
7720
|
+
[
|
|
7721
|
+
Module,
|
|
7722
|
+
Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
|
|
7723
|
+
ResolveData
|
|
7724
|
+
],
|
|
7725
|
+
Module
|
|
7726
|
+
>;
|
|
7439
7727
|
createParser: HookMap<SyncBailHook<any, any>>;
|
|
7440
7728
|
parser: HookMap<SyncHook<any>>;
|
|
7441
7729
|
createGenerator: HookMap<SyncBailHook<any, any>>;
|
|
@@ -7517,7 +7805,7 @@ declare interface NormalModuleLoaderContext<OptionsType> {
|
|
|
7517
7805
|
rootContext: string;
|
|
7518
7806
|
fs: InputFileSystem;
|
|
7519
7807
|
sourceMap?: boolean;
|
|
7520
|
-
mode: "
|
|
7808
|
+
mode: "none" | "development" | "production";
|
|
7521
7809
|
webpack?: boolean;
|
|
7522
7810
|
_module?: NormalModule;
|
|
7523
7811
|
_compilation?: Compilation;
|
|
@@ -7543,8 +7831,8 @@ type NormalizedStatsOptions = KnownNormalizedStatsOptions &
|
|
|
7543
7831
|
Omit<
|
|
7544
7832
|
StatsOptions,
|
|
7545
7833
|
| "context"
|
|
7546
|
-
| "requestShortener"
|
|
7547
7834
|
| "chunkGroups"
|
|
7835
|
+
| "requestShortener"
|
|
7548
7836
|
| "chunksSort"
|
|
7549
7837
|
| "modulesSort"
|
|
7550
7838
|
| "chunkModulesSort"
|
|
@@ -7931,6 +8219,10 @@ declare interface OptimizationSplitChunksOptions {
|
|
|
7931
8219
|
* Sets the name delimiter for created chunks.
|
|
7932
8220
|
*/
|
|
7933
8221
|
automaticNameDelimiter?: string;
|
|
8222
|
+
/**
|
|
8223
|
+
* Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).
|
|
8224
|
+
*/
|
|
8225
|
+
chunks?: "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
|
|
7934
8226
|
/**
|
|
7935
8227
|
* Maximal size hint for the on-demand chunks.
|
|
7936
8228
|
*/
|
|
@@ -8042,6 +8334,11 @@ declare interface Output {
|
|
|
8042
8334
|
| string
|
|
8043
8335
|
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
8044
8336
|
|
|
8337
|
+
/**
|
|
8338
|
+
* Enable/disable creating async chunks that are loaded on demand.
|
|
8339
|
+
*/
|
|
8340
|
+
asyncChunks?: boolean;
|
|
8341
|
+
|
|
8045
8342
|
/**
|
|
8046
8343
|
* Add a comment in the UMD wrapper.
|
|
8047
8344
|
*/
|
|
@@ -8094,6 +8391,20 @@ declare interface Output {
|
|
|
8094
8391
|
*/
|
|
8095
8392
|
crossOriginLoading?: false | "anonymous" | "use-credentials";
|
|
8096
8393
|
|
|
8394
|
+
/**
|
|
8395
|
+
* Specifies the filename template of non-initial output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
8396
|
+
*/
|
|
8397
|
+
cssChunkFilename?:
|
|
8398
|
+
| string
|
|
8399
|
+
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
8400
|
+
|
|
8401
|
+
/**
|
|
8402
|
+
* Specifies the filename template of output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
8403
|
+
*/
|
|
8404
|
+
cssFilename?:
|
|
8405
|
+
| string
|
|
8406
|
+
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
8407
|
+
|
|
8097
8408
|
/**
|
|
8098
8409
|
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
|
|
8099
8410
|
*/
|
|
@@ -8200,7 +8511,7 @@ declare interface Output {
|
|
|
8200
8511
|
libraryExport?: string | string[];
|
|
8201
8512
|
|
|
8202
8513
|
/**
|
|
8203
|
-
* 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).
|
|
8514
|
+
* Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
|
|
8204
8515
|
*/
|
|
8205
8516
|
libraryTarget?: string;
|
|
8206
8517
|
|
|
@@ -8313,6 +8624,10 @@ declare interface OutputFileSystem {
|
|
|
8313
8624
|
arg0: string,
|
|
8314
8625
|
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
|
8315
8626
|
) => void;
|
|
8627
|
+
lstat?: (
|
|
8628
|
+
arg0: string,
|
|
8629
|
+
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
|
8630
|
+
) => void;
|
|
8316
8631
|
readFile: (
|
|
8317
8632
|
arg0: string,
|
|
8318
8633
|
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
|
@@ -8333,6 +8648,11 @@ declare interface OutputNormalized {
|
|
|
8333
8648
|
| string
|
|
8334
8649
|
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
8335
8650
|
|
|
8651
|
+
/**
|
|
8652
|
+
* Enable/disable creating async chunks that are loaded on demand.
|
|
8653
|
+
*/
|
|
8654
|
+
asyncChunks?: boolean;
|
|
8655
|
+
|
|
8336
8656
|
/**
|
|
8337
8657
|
* Add charset attribute for script tag.
|
|
8338
8658
|
*/
|
|
@@ -8380,6 +8700,20 @@ declare interface OutputNormalized {
|
|
|
8380
8700
|
*/
|
|
8381
8701
|
crossOriginLoading?: false | "anonymous" | "use-credentials";
|
|
8382
8702
|
|
|
8703
|
+
/**
|
|
8704
|
+
* Specifies the filename template of non-initial output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
8705
|
+
*/
|
|
8706
|
+
cssChunkFilename?:
|
|
8707
|
+
| string
|
|
8708
|
+
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
8709
|
+
|
|
8710
|
+
/**
|
|
8711
|
+
* Specifies the filename template of output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
8712
|
+
*/
|
|
8713
|
+
cssFilename?:
|
|
8714
|
+
| string
|
|
8715
|
+
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
8716
|
+
|
|
8383
8717
|
/**
|
|
8384
8718
|
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
|
|
8385
8719
|
*/
|
|
@@ -8775,7 +9109,7 @@ declare class ProgressPlugin {
|
|
|
8775
9109
|
showModules?: boolean;
|
|
8776
9110
|
showDependencies?: boolean;
|
|
8777
9111
|
showActiveModules?: boolean;
|
|
8778
|
-
percentBy?: null | "
|
|
9112
|
+
percentBy?: null | "modules" | "dependencies" | "entries";
|
|
8779
9113
|
apply(compiler: Compiler | MultiCompiler): void;
|
|
8780
9114
|
static getReporter(
|
|
8781
9115
|
compiler: Compiler
|
|
@@ -8836,7 +9170,7 @@ declare interface ProgressPluginOptions {
|
|
|
8836
9170
|
/**
|
|
8837
9171
|
* Collect percent algorithm. By default it calculates by a median from modules, entries and dependencies percent.
|
|
8838
9172
|
*/
|
|
8839
|
-
percentBy?: null | "
|
|
9173
|
+
percentBy?: null | "modules" | "dependencies" | "entries";
|
|
8840
9174
|
|
|
8841
9175
|
/**
|
|
8842
9176
|
* Collect profile data for progress steps. Default: false.
|
|
@@ -9003,6 +9337,11 @@ declare interface RenderBootstrapContext {
|
|
|
9003
9337
|
*/
|
|
9004
9338
|
chunk: Chunk;
|
|
9005
9339
|
|
|
9340
|
+
/**
|
|
9341
|
+
* results of code generation
|
|
9342
|
+
*/
|
|
9343
|
+
codeGenerationResults: CodeGenerationResults;
|
|
9344
|
+
|
|
9006
9345
|
/**
|
|
9007
9346
|
* the runtime template
|
|
9008
9347
|
*/
|
|
@@ -9177,6 +9516,11 @@ declare interface ResolveContext {
|
|
|
9177
9516
|
* log function
|
|
9178
9517
|
*/
|
|
9179
9518
|
log?: (arg0: string) => void;
|
|
9519
|
+
|
|
9520
|
+
/**
|
|
9521
|
+
* yield result, if provided plugins can return several results
|
|
9522
|
+
*/
|
|
9523
|
+
yield?: (arg0: ResolveRequest) => void;
|
|
9180
9524
|
}
|
|
9181
9525
|
declare interface ResolveData {
|
|
9182
9526
|
contextInfo: ModuleFactoryCreateDataContextInfo;
|
|
@@ -9186,7 +9530,7 @@ declare interface ResolveData {
|
|
|
9186
9530
|
assertions?: Record<string, any>;
|
|
9187
9531
|
dependencies: ModuleDependency[];
|
|
9188
9532
|
dependencyType: string;
|
|
9189
|
-
createData:
|
|
9533
|
+
createData: Partial<NormalModuleCreateData & { settings: ModuleSettings }>;
|
|
9190
9534
|
fileDependencies: LazySet<string>;
|
|
9191
9535
|
missingDependencies: LazySet<string>;
|
|
9192
9536
|
contextDependencies: LazySet<string>;
|
|
@@ -9356,7 +9700,7 @@ declare interface ResolveOptionsWebpackOptions {
|
|
|
9356
9700
|
/**
|
|
9357
9701
|
* Plugins for the resolver.
|
|
9358
9702
|
*/
|
|
9359
|
-
plugins?: ("..."
|
|
9703
|
+
plugins?: (ResolvePluginInstance | "...")[];
|
|
9360
9704
|
|
|
9361
9705
|
/**
|
|
9362
9706
|
* Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.
|
|
@@ -9961,25 +10305,29 @@ declare class RuntimeSpecSet {
|
|
|
9961
10305
|
constructor(iterable?: any);
|
|
9962
10306
|
add(runtime?: any): void;
|
|
9963
10307
|
has(runtime?: any): boolean;
|
|
9964
|
-
[Symbol.iterator](): IterableIterator<RuntimeSpec>;
|
|
9965
10308
|
readonly size: number;
|
|
10309
|
+
[Symbol.iterator](): IterableIterator<RuntimeSpec>;
|
|
9966
10310
|
}
|
|
9967
10311
|
declare abstract class RuntimeTemplate {
|
|
9968
10312
|
compilation: Compilation;
|
|
9969
10313
|
outputOptions: OutputNormalized;
|
|
9970
10314
|
requestShortener: RequestShortener;
|
|
10315
|
+
globalObject: string;
|
|
10316
|
+
contentHashReplacement: string;
|
|
9971
10317
|
isIIFE(): undefined | boolean;
|
|
9972
10318
|
isModule(): undefined | boolean;
|
|
9973
10319
|
supportsConst(): undefined | boolean;
|
|
9974
10320
|
supportsArrowFunction(): undefined | boolean;
|
|
10321
|
+
supportsOptionalChaining(): undefined | boolean;
|
|
9975
10322
|
supportsForOf(): undefined | boolean;
|
|
9976
10323
|
supportsDestructuring(): undefined | boolean;
|
|
9977
10324
|
supportsBigIntLiteral(): undefined | boolean;
|
|
9978
10325
|
supportsDynamicImport(): undefined | boolean;
|
|
9979
10326
|
supportsEcmaScriptModuleSyntax(): undefined | boolean;
|
|
9980
|
-
supportTemplateLiteral(): boolean;
|
|
10327
|
+
supportTemplateLiteral(): undefined | boolean;
|
|
9981
10328
|
returningFunction(returnValue?: any, args?: string): string;
|
|
9982
10329
|
basicFunction(args?: any, body?: any): string;
|
|
10330
|
+
concatenation(...args: (string | { expr: string })[]): string;
|
|
9983
10331
|
expressionFunction(expression?: any, args?: string): string;
|
|
9984
10332
|
emptyFunction(): "x => {}" | "function() {}";
|
|
9985
10333
|
destructureArray(items?: any, value?: any): string;
|
|
@@ -10356,6 +10704,24 @@ declare abstract class RuntimeTemplate {
|
|
|
10356
10704
|
*/
|
|
10357
10705
|
runtimeRequirements: Set<string>;
|
|
10358
10706
|
}): string;
|
|
10707
|
+
assetUrl(__0: {
|
|
10708
|
+
/**
|
|
10709
|
+
* the module
|
|
10710
|
+
*/
|
|
10711
|
+
module: Module;
|
|
10712
|
+
/**
|
|
10713
|
+
* the public path
|
|
10714
|
+
*/
|
|
10715
|
+
publicPath: string;
|
|
10716
|
+
/**
|
|
10717
|
+
* runtime
|
|
10718
|
+
*/
|
|
10719
|
+
runtime?: RuntimeSpec;
|
|
10720
|
+
/**
|
|
10721
|
+
* the code generation results
|
|
10722
|
+
*/
|
|
10723
|
+
codeGenerationResults: CodeGenerationResults;
|
|
10724
|
+
}): string;
|
|
10359
10725
|
}
|
|
10360
10726
|
declare abstract class RuntimeValue {
|
|
10361
10727
|
fn: (arg0: {
|
|
@@ -10638,7 +11004,6 @@ declare abstract class SortableSet<T> extends Set<T> {
|
|
|
10638
11004
|
* Iterates over values in the set.
|
|
10639
11005
|
*/
|
|
10640
11006
|
[Symbol.iterator](): IterableIterator<T>;
|
|
10641
|
-
readonly [Symbol.toStringTag]: string;
|
|
10642
11007
|
}
|
|
10643
11008
|
declare class Source {
|
|
10644
11009
|
constructor();
|
|
@@ -10828,6 +11193,7 @@ type Statement =
|
|
|
10828
11193
|
| ClassDeclaration
|
|
10829
11194
|
| ExpressionStatement
|
|
10830
11195
|
| BlockStatement
|
|
11196
|
+
| StaticBlock
|
|
10831
11197
|
| EmptyStatement
|
|
10832
11198
|
| DebuggerStatement
|
|
10833
11199
|
| WithStatement
|
|
@@ -11195,7 +11561,7 @@ declare interface StatsOptions {
|
|
|
11195
11561
|
/**
|
|
11196
11562
|
* Add logging output.
|
|
11197
11563
|
*/
|
|
11198
|
-
logging?: boolean | "none" | "
|
|
11564
|
+
logging?: boolean | "none" | "error" | "warn" | "info" | "log" | "verbose";
|
|
11199
11565
|
|
|
11200
11566
|
/**
|
|
11201
11567
|
* Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions.
|
|
@@ -11364,15 +11730,40 @@ type StatsPrinterContext = KnownStatsPrinterContext & Record<string, any>;
|
|
|
11364
11730
|
type StatsProfile = KnownStatsProfile & Record<string, any>;
|
|
11365
11731
|
type StatsValue =
|
|
11366
11732
|
| boolean
|
|
11733
|
+
| StatsOptions
|
|
11367
11734
|
| "none"
|
|
11735
|
+
| "verbose"
|
|
11368
11736
|
| "summary"
|
|
11369
11737
|
| "errors-only"
|
|
11370
11738
|
| "errors-warnings"
|
|
11371
11739
|
| "minimal"
|
|
11372
11740
|
| "normal"
|
|
11373
|
-
| "detailed"
|
|
11374
|
-
|
|
11375
|
-
|
|
11741
|
+
| "detailed";
|
|
11742
|
+
declare class SyncModuleIdsPlugin {
|
|
11743
|
+
constructor(__0: {
|
|
11744
|
+
/**
|
|
11745
|
+
* path to file
|
|
11746
|
+
*/
|
|
11747
|
+
path: string;
|
|
11748
|
+
/**
|
|
11749
|
+
* context for module names
|
|
11750
|
+
*/
|
|
11751
|
+
context?: string;
|
|
11752
|
+
/**
|
|
11753
|
+
* selector for modules
|
|
11754
|
+
*/
|
|
11755
|
+
test: (arg0: Module) => boolean;
|
|
11756
|
+
/**
|
|
11757
|
+
* operation mode (defaults to merge)
|
|
11758
|
+
*/
|
|
11759
|
+
mode?: "read" | "create" | "merge" | "update";
|
|
11760
|
+
});
|
|
11761
|
+
|
|
11762
|
+
/**
|
|
11763
|
+
* Apply the plugin
|
|
11764
|
+
*/
|
|
11765
|
+
apply(compiler: Compiler): void;
|
|
11766
|
+
}
|
|
11376
11767
|
declare interface SyntheticDependencyLocation {
|
|
11377
11768
|
name: string;
|
|
11378
11769
|
index?: number;
|
|
@@ -11449,6 +11840,7 @@ declare interface UpdateHashContextGenerator {
|
|
|
11449
11840
|
module: NormalModule;
|
|
11450
11841
|
chunkGraph: ChunkGraph;
|
|
11451
11842
|
runtime: RuntimeSpec;
|
|
11843
|
+
runtimeTemplate?: RuntimeTemplate;
|
|
11452
11844
|
}
|
|
11453
11845
|
type UsageStateType = 0 | 1 | 2 | 3 | 4;
|
|
11454
11846
|
declare interface UserResolveOptions {
|
|
@@ -11577,7 +11969,7 @@ declare interface UserResolveOptions {
|
|
|
11577
11969
|
restrictions?: (string | RegExp)[];
|
|
11578
11970
|
|
|
11579
11971
|
/**
|
|
11580
|
-
* Use only the sync
|
|
11972
|
+
* Use only the sync constraints of the file system calls
|
|
11581
11973
|
*/
|
|
11582
11974
|
useSyncFileSystemCalls?: boolean;
|
|
11583
11975
|
|
|
@@ -11697,6 +12089,32 @@ declare interface Watcher {
|
|
|
11697
12089
|
* get info about directories
|
|
11698
12090
|
*/
|
|
11699
12091
|
getContextTimeInfoEntries: () => Map<string, FileSystemInfoEntry | "ignore">;
|
|
12092
|
+
|
|
12093
|
+
/**
|
|
12094
|
+
* get info about timestamps and changes
|
|
12095
|
+
*/
|
|
12096
|
+
getInfo?: () => WatcherInfo;
|
|
12097
|
+
}
|
|
12098
|
+
declare interface WatcherInfo {
|
|
12099
|
+
/**
|
|
12100
|
+
* get current aggregated changes that have not yet send to callback
|
|
12101
|
+
*/
|
|
12102
|
+
changes: Set<string>;
|
|
12103
|
+
|
|
12104
|
+
/**
|
|
12105
|
+
* get current aggregated removals that have not yet send to callback
|
|
12106
|
+
*/
|
|
12107
|
+
removals: Set<string>;
|
|
12108
|
+
|
|
12109
|
+
/**
|
|
12110
|
+
* get info about files
|
|
12111
|
+
*/
|
|
12112
|
+
fileTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">;
|
|
12113
|
+
|
|
12114
|
+
/**
|
|
12115
|
+
* get info about directories
|
|
12116
|
+
*/
|
|
12117
|
+
contextTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">;
|
|
11700
12118
|
}
|
|
11701
12119
|
declare abstract class Watching {
|
|
11702
12120
|
startTime: null | number;
|
|
@@ -11914,6 +12332,7 @@ declare interface WebpackOptionsNormalized {
|
|
|
11914
12332
|
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
|
|
11915
12333
|
*/
|
|
11916
12334
|
externalsType?:
|
|
12335
|
+
| "import"
|
|
11917
12336
|
| "var"
|
|
11918
12337
|
| "module"
|
|
11919
12338
|
| "assign"
|
|
@@ -11924,6 +12343,7 @@ declare interface WebpackOptionsNormalized {
|
|
|
11924
12343
|
| "commonjs"
|
|
11925
12344
|
| "commonjs2"
|
|
11926
12345
|
| "commonjs-module"
|
|
12346
|
+
| "commonjs-static"
|
|
11927
12347
|
| "amd"
|
|
11928
12348
|
| "amd-require"
|
|
11929
12349
|
| "umd"
|
|
@@ -11931,7 +12351,6 @@ declare interface WebpackOptionsNormalized {
|
|
|
11931
12351
|
| "jsonp"
|
|
11932
12352
|
| "system"
|
|
11933
12353
|
| "promise"
|
|
11934
|
-
| "import"
|
|
11935
12354
|
| "script"
|
|
11936
12355
|
| "node-commonjs";
|
|
11937
12356
|
|
|
@@ -11956,7 +12375,7 @@ declare interface WebpackOptionsNormalized {
|
|
|
11956
12375
|
/**
|
|
11957
12376
|
* Enable production optimizations or development hints.
|
|
11958
12377
|
*/
|
|
11959
|
-
mode?: "
|
|
12378
|
+
mode?: "none" | "development" | "production";
|
|
11960
12379
|
|
|
11961
12380
|
/**
|
|
11962
12381
|
* Options affecting the normal modules (`NormalModuleFactory`).
|
|
@@ -12215,11 +12634,16 @@ declare namespace exports {
|
|
|
12215
12634
|
export let uncaughtErrorHandler: string;
|
|
12216
12635
|
export let scriptNonce: string;
|
|
12217
12636
|
export let loadScript: string;
|
|
12637
|
+
export let createScript: string;
|
|
12218
12638
|
export let createScriptUrl: string;
|
|
12639
|
+
export let getTrustedTypesPolicy: string;
|
|
12219
12640
|
export let chunkName: string;
|
|
12220
12641
|
export let runtimeId: string;
|
|
12221
12642
|
export let getChunkScriptFilename: string;
|
|
12643
|
+
export let getChunkCssFilename: string;
|
|
12644
|
+
export let hasCssModules: string;
|
|
12222
12645
|
export let getChunkUpdateScriptFilename: string;
|
|
12646
|
+
export let getChunkUpdateCssFilename: string;
|
|
12223
12647
|
export let startup: string;
|
|
12224
12648
|
export let startupNoDefault: string;
|
|
12225
12649
|
export let startupOnlyAfter: string;
|
|
@@ -12555,6 +12979,9 @@ declare namespace exports {
|
|
|
12555
12979
|
export namespace schemes {
|
|
12556
12980
|
export { HttpUriPlugin };
|
|
12557
12981
|
}
|
|
12982
|
+
export namespace ids {
|
|
12983
|
+
export { SyncModuleIdsPlugin };
|
|
12984
|
+
}
|
|
12558
12985
|
}
|
|
12559
12986
|
export type WebpackPluginFunction = (
|
|
12560
12987
|
this: Compiler,
|
|
@@ -12620,6 +13047,7 @@ declare namespace exports {
|
|
|
12620
13047
|
Entry,
|
|
12621
13048
|
EntryNormalized,
|
|
12622
13049
|
EntryObject,
|
|
13050
|
+
FileCacheOptions,
|
|
12623
13051
|
LibraryOptions,
|
|
12624
13052
|
ModuleOptions,
|
|
12625
13053
|
ResolveOptionsWebpackOptions as ResolveOptions,
|
|
@@ -12628,14 +13056,21 @@ declare namespace exports {
|
|
|
12628
13056
|
RuleSetRule,
|
|
12629
13057
|
RuleSetUse,
|
|
12630
13058
|
RuleSetUseItem,
|
|
13059
|
+
StatsOptions,
|
|
12631
13060
|
Configuration,
|
|
12632
13061
|
WebpackOptionsNormalized,
|
|
12633
13062
|
WebpackPluginInstance,
|
|
12634
13063
|
Asset,
|
|
12635
13064
|
AssetInfo,
|
|
13065
|
+
EntryOptions,
|
|
13066
|
+
AssetEmittedInfo,
|
|
12636
13067
|
MultiStats,
|
|
12637
13068
|
ParserState,
|
|
13069
|
+
ResolvePluginInstance,
|
|
13070
|
+
Resolver,
|
|
12638
13071
|
Watching,
|
|
13072
|
+
Argument,
|
|
13073
|
+
Problem,
|
|
12639
13074
|
StatsAsset,
|
|
12640
13075
|
StatsChunk,
|
|
12641
13076
|
StatsChunkGroup,
|