@rspack/core 1.0.0-alpha.5 → 1.0.0-beta.1
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/compiled/zod/index.d.ts +138 -52
- package/compiled/zod/index.js +300 -103
- package/compiled/zod/package.json +1 -1
- package/compiled/zod-validation-error/index.js +6 -6
- package/dist/Compilation.d.ts +22 -4
- package/dist/Compilation.js +64 -49
- package/dist/Compiler.d.ts +11 -10
- package/dist/Compiler.js +42 -42
- package/dist/ErrorHelpers.js +2 -4
- package/dist/Module.d.ts +1 -0
- package/dist/Module.js +3 -6
- package/dist/ModuleTypeConstants.d.ts +45 -69
- package/dist/ModuleTypeConstants.js +24 -77
- package/dist/NormalModule.d.ts +1 -0
- package/dist/NormalModule.js +1 -0
- package/dist/Stats.js +4 -6
- package/dist/Template.d.ts +31 -147
- package/dist/Template.js +40 -236
- package/dist/builtin-loader/lightningcss/index.d.ts +89 -0
- package/dist/builtin-loader/lightningcss/index.js +175 -0
- package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/BannerPlugin.d.ts +25 -49
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
- package/dist/builtin-plugin/DefinePlugin.js +9 -13
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.d.ts +4 -3
- package/dist/builtin-plugin/EntryPlugin.js +1 -0
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +29 -5
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
- package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +9 -9
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +2 -2
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LightningCssMiminizerRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LightningCssMiminizerRspackPlugin.js +4 -1
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SplitChunksPlugin.js +5 -15
- package/dist/builtin-plugin/SwcCssMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.js +15 -23
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
- package/dist/builtin-plugin/base.d.ts +1 -1
- package/dist/builtin-plugin/base.js +1 -3
- package/dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.d.ts +3 -3
- package/dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.js +17 -66
- package/dist/builtin-plugin/css-extract/hmr/normalizeUrl.d.ts +2 -0
- package/dist/builtin-plugin/css-extract/hmr/{normalize-url.js → normalizeUrl.js} +15 -24
- package/dist/builtin-plugin/css-extract/loader.d.ts +8 -3
- package/dist/builtin-plugin/css-extract/loader.js +28 -17
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
- package/dist/config/adapter.d.ts +1 -1
- package/dist/config/adapter.js +39 -25
- package/dist/config/adapterRuleUse.d.ts +5 -5
- package/dist/config/adapterRuleUse.js +23 -1
- package/dist/config/browserslistTargetHandler.d.ts +17 -15
- package/dist/config/browserslistTargetHandler.js +27 -33
- package/dist/config/defaults.js +27 -31
- package/dist/config/normalization.d.ts +8 -3
- package/dist/config/normalization.js +7 -5
- package/dist/config/target.d.ts +48 -109
- package/dist/config/target.js +50 -86
- package/dist/config/zod.d.ts +2660 -2305
- package/dist/config/zod.js +38 -19
- package/dist/container/ContainerPlugin.d.ts +7 -7
- package/dist/container/ContainerReferencePlugin.d.ts +1 -1
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/container/options.js +1 -1
- package/dist/exports.d.ts +4 -4
- package/dist/exports.js +2 -2
- package/dist/lib/AbstractMethodError.d.ts +12 -3
- package/dist/lib/AbstractMethodError.js +29 -21
- package/dist/lib/Cache.d.ts +40 -46
- package/dist/lib/Cache.js +43 -78
- package/dist/lib/CacheFacade.d.ts +119 -143
- package/dist/lib/CacheFacade.js +123 -123
- package/dist/lib/EntryOptionPlugin.d.ts +19 -2
- package/dist/lib/EntryOptionPlugin.js +22 -6
- package/dist/lib/EnvironmentPlugin.d.ts +17 -10
- package/dist/lib/EnvironmentPlugin.js +16 -15
- package/dist/lib/HookWebpackError.d.ts +27 -33
- package/dist/lib/HookWebpackError.js +33 -34
- package/dist/lib/IgnoreWarningsPlugin.d.ts +25 -0
- package/dist/lib/{ignoreWarningsPlugin.js → IgnoreWarningsPlugin.js} +17 -0
- package/dist/lib/LoaderOptionsPlugin.d.ts +18 -9
- package/dist/lib/LoaderOptionsPlugin.js +38 -14
- package/dist/lib/LoaderTargetPlugin.d.ts +17 -8
- package/dist/lib/LoaderTargetPlugin.js +17 -15
- package/dist/lib/ModuleFilenameHelpers.d.ts +10 -1
- package/dist/lib/ModuleFilenameHelpers.js +10 -3
- package/dist/lib/NormalModuleReplacementPlugin.d.ts +15 -5
- package/dist/lib/NormalModuleReplacementPlugin.js +15 -5
- package/dist/lib/WebpackError.d.ts +29 -22
- package/dist/lib/WebpackError.js +17 -29
- package/dist/lib/cache/getLazyHashedEtag.d.ts +24 -24
- package/dist/lib/cache/getLazyHashedEtag.js +20 -23
- package/dist/lib/cache/mergeEtags.d.ts +15 -9
- package/dist/lib/cache/mergeEtags.js +23 -22
- package/dist/lib/formatLocation.d.ts +13 -8
- package/dist/lib/formatLocation.js +20 -20
- package/dist/loader-runner/LoaderLoadingError.d.ts +11 -1
- package/dist/loader-runner/LoaderLoadingError.js +3 -5
- package/dist/loader-runner/index.js +7 -9
- package/dist/loader-runner/loadLoader.d.ts +11 -2
- package/dist/loader-runner/loadLoader.js +17 -19
- package/dist/logging/createConsoleLogger.js +2 -6
- package/dist/logging/truncateArgs.js +5 -9
- package/dist/node/nodeConsole.js +1 -3
- package/dist/rspackOptionsApply.js +2 -2
- package/dist/stats/DefaultStatsFactoryPlugin.js +18 -8
- package/dist/stats/DefaultStatsPresetPlugin.js +4 -4
- package/dist/stats/DefaultStatsPrinterPlugin.js +11 -16
- package/dist/stats/StatsFactory.js +13 -17
- package/dist/stats/StatsPrinter.js +7 -9
- package/dist/util/AssetInfo.js +11 -7
- package/dist/util/SplitChunkSize.js +1 -1
- package/dist/util/cleverMerge.d.ts +33 -57
- package/dist/util/cleverMerge.js +89 -145
- package/dist/util/comparators.d.ts +1 -1
- package/dist/util/comparators.js +3 -5
- package/dist/util/createHash.d.ts +4 -3
- package/dist/util/createHash.js +31 -45
- package/dist/util/fs.js +9 -13
- package/dist/util/hash/BatchedHash.d.ts +24 -9
- package/dist/util/hash/BatchedHash.js +16 -13
- package/dist/util/hash/index.d.ts +9 -9
- package/dist/util/hash/index.js +14 -11
- package/dist/util/hash/md4.d.ts +29 -2
- package/dist/util/hash/md4.js +7 -3
- package/dist/util/hash/wasm-hash.d.ts +52 -5
- package/dist/util/hash/wasm-hash.js +19 -22
- package/dist/util/hash/xxhash64.d.ts +29 -2
- package/dist/util/hash/xxhash64.js +7 -3
- package/dist/util/identifier.js +9 -15
- package/dist/util/index.js +1 -1
- package/dist/util/memoize.js +7 -9
- package/package.json +9 -8
- package/compiled/enhanced-resolve/index.js +0 -5566
- package/dist/builtin-plugin/css-extract/hmr/normalize-url.d.ts +0 -2
- package/dist/lib/ignoreWarningsPlugin.d.ts +0 -7
|
@@ -1,117 +1,93 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export type WebAssemblyModuleTypes = "webassembly/async" | "webassembly/sync";
|
|
4
|
-
export type CSSModuleTypes = "css" | "css/global" | "css/module";
|
|
5
|
-
export type AssetModuleTypes = "asset" | "asset/inline" | "asset/resource" | "asset/source" | "asset/raw-data-url";
|
|
6
|
-
export type WebpackModuleTypes = "runtime" | "fallback-module" | "remote-module" | "provide-module" | "consume-shared-module" | "lazy-compilation-proxy";
|
|
7
|
-
export type UnknownModuleTypes = string;
|
|
8
|
-
export type ModuleTypes = JavaScriptModuleTypes | JSONModuleType | WebAssemblyModuleTypes | CSSModuleTypes | AssetModuleTypes | WebpackModuleTypes | UnknownModuleTypes;
|
|
9
|
-
/**
|
|
10
|
-
* @type {Readonly<"asset">}
|
|
11
|
-
* This is the module type used for automatically choosing between `asset/inline`, `asset/resource` based on asset size limit (8096).
|
|
12
|
-
*/
|
|
13
|
-
export const ASSET_MODULE_TYPE: Readonly<"asset">;
|
|
14
|
-
/**
|
|
15
|
-
* @type {Readonly<"asset/raw-data-url">}
|
|
16
|
-
* TODO: Document what this asset type is for. See css-loader tests for its usage.
|
|
17
|
-
*/
|
|
18
|
-
export const ASSET_MODULE_TYPE_RAW_DATA_URL: Readonly<"asset/raw-data-url">;
|
|
19
|
-
/**
|
|
20
|
-
* @type {Readonly<"asset/source">}
|
|
21
|
-
* This is the module type used for assets that are imported as source code. This is the equivalent of `raw-loader`.
|
|
22
|
-
*/
|
|
23
|
-
export const ASSET_MODULE_TYPE_SOURCE: Readonly<"asset/source">;
|
|
24
|
-
/**
|
|
25
|
-
* @type {Readonly<"asset/resource">}
|
|
26
|
-
* This is the module type used for assets that are copied to the output directory. This is the equivalent of `file-loader`.
|
|
27
|
-
*/
|
|
28
|
-
export const ASSET_MODULE_TYPE_RESOURCE: Readonly<"asset/resource">;
|
|
29
|
-
/**
|
|
30
|
-
* @type {Readonly<"asset/inline">}
|
|
31
|
-
* This is the module type used for assets that are inlined as a data URI. This is the equivalent of `url-loader`.
|
|
32
|
-
*/
|
|
33
|
-
export const ASSET_MODULE_TYPE_INLINE: Readonly<"asset/inline">;
|
|
34
|
-
/**
|
|
35
|
-
* @type {Readonly<"javascript/auto">}
|
|
36
|
-
*/
|
|
37
|
-
export const JAVASCRIPT_MODULE_TYPE_AUTO: Readonly<"javascript/auto">;
|
|
1
|
+
export declare const JAVASCRIPT_MODULE_TYPE_AUTO = "javascript/auto";
|
|
2
|
+
export declare const JAVASCRIPT_MODULE_TYPE_DYNAMIC = "javascript/dynamic";
|
|
38
3
|
/**
|
|
39
|
-
* @type {Readonly<"javascript/dynamic">}
|
|
40
|
-
*/
|
|
41
|
-
export const JAVASCRIPT_MODULE_TYPE_DYNAMIC: Readonly<"javascript/dynamic">;
|
|
42
|
-
/**
|
|
43
|
-
* @type {Readonly<"javascript/esm">}
|
|
44
4
|
* This is the module type used for _strict_ ES Module syntax. This means that all legacy formats
|
|
45
5
|
* that webpack supports (CommonJS, AMD, SystemJS) are not supported.
|
|
46
6
|
*/
|
|
47
|
-
export const JAVASCRIPT_MODULE_TYPE_ESM
|
|
7
|
+
export declare const JAVASCRIPT_MODULE_TYPE_ESM = "javascript/esm";
|
|
48
8
|
/**
|
|
49
|
-
* @type {Readonly<"json">}
|
|
50
9
|
* This is the module type used for JSON files. JSON files are always parsed as ES Module.
|
|
51
10
|
*/
|
|
52
|
-
export const JSON_MODULE_TYPE
|
|
11
|
+
export declare const JSON_MODULE_TYPE = "json";
|
|
53
12
|
/**
|
|
54
|
-
* @type {Readonly<"webassembly/async">}
|
|
55
13
|
* This is the module type used for WebAssembly modules. In webpack 5 they are always treated as async modules.
|
|
56
14
|
*
|
|
57
15
|
*/
|
|
58
|
-
export const WEBASSEMBLY_MODULE_TYPE_ASYNC
|
|
16
|
+
export declare const WEBASSEMBLY_MODULE_TYPE_ASYNC = "webassembly/async";
|
|
59
17
|
/**
|
|
60
|
-
* @type {Readonly<"webassembly/sync">}
|
|
61
18
|
* This is the module type used for WebAssembly modules. In webpack 4 they are always treated as sync modules.
|
|
62
19
|
* There is a legacy option to support this usage in webpack 5 and up.
|
|
63
20
|
*/
|
|
64
|
-
export const WEBASSEMBLY_MODULE_TYPE_SYNC
|
|
21
|
+
export declare const WEBASSEMBLY_MODULE_TYPE_SYNC = "webassembly/sync";
|
|
65
22
|
/**
|
|
66
|
-
* @type {Readonly<"css">}
|
|
67
23
|
* This is the module type used for CSS files.
|
|
68
24
|
*/
|
|
69
|
-
export const CSS_MODULE_TYPE
|
|
25
|
+
export declare const CSS_MODULE_TYPE = "css";
|
|
70
26
|
/**
|
|
71
|
-
* @type {Readonly<"css/global">}
|
|
72
27
|
* This is the module type used for CSS modules files where you need to use `:local` in selector list to hash classes.
|
|
73
28
|
*/
|
|
74
|
-
export const CSS_MODULE_TYPE_GLOBAL
|
|
29
|
+
export declare const CSS_MODULE_TYPE_GLOBAL = "css/global";
|
|
75
30
|
/**
|
|
76
|
-
* @type {Readonly<"css/module">}
|
|
77
31
|
* This is the module type used for CSS modules files, by default all classes are hashed.
|
|
78
32
|
*/
|
|
79
|
-
export const CSS_MODULE_TYPE_MODULE
|
|
33
|
+
export declare const CSS_MODULE_TYPE_MODULE = "css/module";
|
|
80
34
|
/**
|
|
81
|
-
* @type {Readonly<"css/auto">}
|
|
82
35
|
* This is the module type used for CSS files, the module will be parsed as CSS modules if it's filename contains `.module.` or `.modules.`.
|
|
83
36
|
*/
|
|
84
|
-
export const CSS_MODULE_TYPE_AUTO
|
|
37
|
+
export declare const CSS_MODULE_TYPE_AUTO = "css/auto";
|
|
38
|
+
/**
|
|
39
|
+
* This is the module type used for automatically choosing between `asset/inline`, `asset/resource` based on asset size limit (8096).
|
|
40
|
+
*/
|
|
41
|
+
export declare const ASSET_MODULE_TYPE = "asset";
|
|
42
|
+
/**
|
|
43
|
+
* This is the module type used for assets that are inlined as a data URI. This is the equivalent of `url-loader`.
|
|
44
|
+
*/
|
|
45
|
+
export declare const ASSET_MODULE_TYPE_INLINE = "asset/inline";
|
|
46
|
+
/**
|
|
47
|
+
* This is the module type used for assets that are copied to the output directory. This is the equivalent of `file-loader`.
|
|
48
|
+
*/
|
|
49
|
+
export declare const ASSET_MODULE_TYPE_RESOURCE = "asset/resource";
|
|
50
|
+
/**
|
|
51
|
+
* @type {Readonly<"asset/source">}
|
|
52
|
+
* This is the module type used for assets that are imported as source code. This is the equivalent of `raw-loader`.
|
|
53
|
+
*/
|
|
54
|
+
export declare const ASSET_MODULE_TYPE_SOURCE = "asset/source";
|
|
55
|
+
/**
|
|
56
|
+
* TODO: Document what this asset type is for. See css-loader tests for its usage.
|
|
57
|
+
*/
|
|
58
|
+
export declare const ASSET_MODULE_TYPE_RAW_DATA_URL = "asset/raw-data-url";
|
|
85
59
|
/**
|
|
86
|
-
* @type {Readonly<"runtime">}
|
|
87
60
|
* This is the module type used for the webpack runtime abstractions.
|
|
88
61
|
*/
|
|
89
|
-
export const WEBPACK_MODULE_TYPE_RUNTIME
|
|
62
|
+
export declare const WEBPACK_MODULE_TYPE_RUNTIME = "runtime";
|
|
90
63
|
/**
|
|
91
|
-
* @type {Readonly<"fallback-module">}
|
|
92
64
|
* This is the module type used for the ModuleFederation feature's FallbackModule class.
|
|
93
65
|
* TODO: Document this better.
|
|
94
66
|
*/
|
|
95
|
-
export const WEBPACK_MODULE_TYPE_FALLBACK
|
|
67
|
+
export declare const WEBPACK_MODULE_TYPE_FALLBACK = "fallback-module";
|
|
96
68
|
/**
|
|
97
|
-
* @type {Readonly<"remote-module">}
|
|
98
69
|
* This is the module type used for the ModuleFederation feature's RemoteModule class.
|
|
99
70
|
* TODO: Document this better.
|
|
100
71
|
*/
|
|
101
|
-
export const WEBPACK_MODULE_TYPE_REMOTE
|
|
72
|
+
export declare const WEBPACK_MODULE_TYPE_REMOTE = "remote-module";
|
|
102
73
|
/**
|
|
103
|
-
* @type {Readonly<"provide-module">}
|
|
104
74
|
* This is the module type used for the ModuleFederation feature's ProvideModule class.
|
|
105
75
|
* TODO: Document this better.
|
|
106
76
|
*/
|
|
107
|
-
export const WEBPACK_MODULE_TYPE_PROVIDE
|
|
77
|
+
export declare const WEBPACK_MODULE_TYPE_PROVIDE = "provide-module";
|
|
108
78
|
/**
|
|
109
|
-
* @type {Readonly<"consume-shared-module">}
|
|
110
79
|
* This is the module type used for the ModuleFederation feature's ConsumeSharedModule class.
|
|
111
80
|
*/
|
|
112
|
-
export const WEBPACK_MODULE_TYPE_CONSUME_SHARED_MODULE
|
|
81
|
+
export declare const WEBPACK_MODULE_TYPE_CONSUME_SHARED_MODULE = "consume-shared-module";
|
|
113
82
|
/**
|
|
114
|
-
* @type {Readonly<"lazy-compilation-proxy">}
|
|
115
83
|
* Module type used for `experiments.lazyCompilation` feature. See `LazyCompilationPlugin` for more information.
|
|
116
84
|
*/
|
|
117
|
-
export const WEBPACK_MODULE_TYPE_LAZY_COMPILATION_PROXY
|
|
85
|
+
export declare const WEBPACK_MODULE_TYPE_LAZY_COMPILATION_PROXY = "lazy-compilation-proxy";
|
|
86
|
+
export type JavaScriptModuleTypes = "javascript/auto" | "javascript/dynamic" | "javascript/esm";
|
|
87
|
+
export type JSONModuleType = "json";
|
|
88
|
+
export type WebAssemblyModuleTypes = "webassembly/async" | "webassembly/sync";
|
|
89
|
+
export type CSSModuleTypes = "css" | "css/global" | "css/module";
|
|
90
|
+
export type AssetModuleTypes = "asset" | "asset/inline" | "asset/resource" | "asset/source" | "asset/raw-data-url";
|
|
91
|
+
export type WebpackModuleTypes = "runtime" | "fallback-module" | "remote-module" | "provide-module" | "consume-shared-module" | "lazy-compilation-proxy";
|
|
92
|
+
export type UnknownModuleTypes = string;
|
|
93
|
+
export type ModuleTypes = JavaScriptModuleTypes | JSONModuleType | WebAssemblyModuleTypes | CSSModuleTypes | AssetModuleTypes | WebpackModuleTypes | UnknownModuleTypes;
|
|
@@ -1,145 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/*
|
|
2
3
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
3
4
|
Author Sean Larkin @TheLarkInn
|
|
4
5
|
*/
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const JAVASCRIPT_MODULE_TYPE_AUTO = "javascript/auto";
|
|
10
|
-
/**
|
|
11
|
-
* @type {Readonly<"javascript/dynamic">}
|
|
12
|
-
*/
|
|
13
|
-
const JAVASCRIPT_MODULE_TYPE_DYNAMIC = "javascript/dynamic";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.WEBPACK_MODULE_TYPE_LAZY_COMPILATION_PROXY = exports.WEBPACK_MODULE_TYPE_CONSUME_SHARED_MODULE = exports.WEBPACK_MODULE_TYPE_PROVIDE = exports.WEBPACK_MODULE_TYPE_REMOTE = exports.WEBPACK_MODULE_TYPE_FALLBACK = exports.WEBPACK_MODULE_TYPE_RUNTIME = exports.ASSET_MODULE_TYPE_RAW_DATA_URL = exports.ASSET_MODULE_TYPE_SOURCE = exports.ASSET_MODULE_TYPE_RESOURCE = exports.ASSET_MODULE_TYPE_INLINE = exports.ASSET_MODULE_TYPE = exports.CSS_MODULE_TYPE_AUTO = exports.CSS_MODULE_TYPE_MODULE = exports.CSS_MODULE_TYPE_GLOBAL = exports.CSS_MODULE_TYPE = exports.WEBASSEMBLY_MODULE_TYPE_SYNC = exports.WEBASSEMBLY_MODULE_TYPE_ASYNC = exports.JSON_MODULE_TYPE = exports.JAVASCRIPT_MODULE_TYPE_ESM = exports.JAVASCRIPT_MODULE_TYPE_DYNAMIC = exports.JAVASCRIPT_MODULE_TYPE_AUTO = void 0;
|
|
8
|
+
exports.JAVASCRIPT_MODULE_TYPE_AUTO = "javascript/auto";
|
|
9
|
+
exports.JAVASCRIPT_MODULE_TYPE_DYNAMIC = "javascript/dynamic";
|
|
14
10
|
/**
|
|
15
|
-
* @type {Readonly<"javascript/esm">}
|
|
16
11
|
* This is the module type used for _strict_ ES Module syntax. This means that all legacy formats
|
|
17
12
|
* that webpack supports (CommonJS, AMD, SystemJS) are not supported.
|
|
18
13
|
*/
|
|
19
|
-
|
|
14
|
+
exports.JAVASCRIPT_MODULE_TYPE_ESM = "javascript/esm";
|
|
20
15
|
/**
|
|
21
|
-
* @type {Readonly<"json">}
|
|
22
16
|
* This is the module type used for JSON files. JSON files are always parsed as ES Module.
|
|
23
17
|
*/
|
|
24
|
-
|
|
18
|
+
exports.JSON_MODULE_TYPE = "json";
|
|
25
19
|
/**
|
|
26
|
-
* @type {Readonly<"webassembly/async">}
|
|
27
20
|
* This is the module type used for WebAssembly modules. In webpack 5 they are always treated as async modules.
|
|
28
21
|
*
|
|
29
22
|
*/
|
|
30
|
-
|
|
23
|
+
exports.WEBASSEMBLY_MODULE_TYPE_ASYNC = "webassembly/async";
|
|
31
24
|
/**
|
|
32
|
-
* @type {Readonly<"webassembly/sync">}
|
|
33
25
|
* This is the module type used for WebAssembly modules. In webpack 4 they are always treated as sync modules.
|
|
34
26
|
* There is a legacy option to support this usage in webpack 5 and up.
|
|
35
27
|
*/
|
|
36
|
-
|
|
28
|
+
exports.WEBASSEMBLY_MODULE_TYPE_SYNC = "webassembly/sync";
|
|
37
29
|
/**
|
|
38
|
-
* @type {Readonly<"css">}
|
|
39
30
|
* This is the module type used for CSS files.
|
|
40
31
|
*/
|
|
41
|
-
|
|
32
|
+
exports.CSS_MODULE_TYPE = "css";
|
|
42
33
|
/**
|
|
43
|
-
* @type {Readonly<"css/global">}
|
|
44
34
|
* This is the module type used for CSS modules files where you need to use `:local` in selector list to hash classes.
|
|
45
35
|
*/
|
|
46
|
-
|
|
36
|
+
exports.CSS_MODULE_TYPE_GLOBAL = "css/global";
|
|
47
37
|
/**
|
|
48
|
-
* @type {Readonly<"css/module">}
|
|
49
38
|
* This is the module type used for CSS modules files, by default all classes are hashed.
|
|
50
39
|
*/
|
|
51
|
-
|
|
40
|
+
exports.CSS_MODULE_TYPE_MODULE = "css/module";
|
|
52
41
|
/**
|
|
53
|
-
* @type {Readonly<"css/auto">}
|
|
54
42
|
* This is the module type used for CSS files, the module will be parsed as CSS modules if it's filename contains `.module.` or `.modules.`.
|
|
55
43
|
*/
|
|
56
|
-
|
|
44
|
+
exports.CSS_MODULE_TYPE_AUTO = "css/auto";
|
|
57
45
|
/**
|
|
58
|
-
* @type {Readonly<"asset">}
|
|
59
46
|
* This is the module type used for automatically choosing between `asset/inline`, `asset/resource` based on asset size limit (8096).
|
|
60
47
|
*/
|
|
61
|
-
|
|
48
|
+
exports.ASSET_MODULE_TYPE = "asset";
|
|
62
49
|
/**
|
|
63
|
-
* @type {Readonly<"asset/inline">}
|
|
64
50
|
* This is the module type used for assets that are inlined as a data URI. This is the equivalent of `url-loader`.
|
|
65
51
|
*/
|
|
66
|
-
|
|
52
|
+
exports.ASSET_MODULE_TYPE_INLINE = "asset/inline";
|
|
67
53
|
/**
|
|
68
|
-
* @type {Readonly<"asset/resource">}
|
|
69
54
|
* This is the module type used for assets that are copied to the output directory. This is the equivalent of `file-loader`.
|
|
70
55
|
*/
|
|
71
|
-
|
|
56
|
+
exports.ASSET_MODULE_TYPE_RESOURCE = "asset/resource";
|
|
72
57
|
/**
|
|
73
58
|
* @type {Readonly<"asset/source">}
|
|
74
59
|
* This is the module type used for assets that are imported as source code. This is the equivalent of `raw-loader`.
|
|
75
60
|
*/
|
|
76
|
-
|
|
61
|
+
exports.ASSET_MODULE_TYPE_SOURCE = "asset/source";
|
|
77
62
|
/**
|
|
78
|
-
* @type {Readonly<"asset/raw-data-url">}
|
|
79
63
|
* TODO: Document what this asset type is for. See css-loader tests for its usage.
|
|
80
64
|
*/
|
|
81
|
-
|
|
65
|
+
exports.ASSET_MODULE_TYPE_RAW_DATA_URL = "asset/raw-data-url";
|
|
82
66
|
/**
|
|
83
|
-
* @type {Readonly<"runtime">}
|
|
84
67
|
* This is the module type used for the webpack runtime abstractions.
|
|
85
68
|
*/
|
|
86
|
-
|
|
69
|
+
exports.WEBPACK_MODULE_TYPE_RUNTIME = "runtime";
|
|
87
70
|
/**
|
|
88
|
-
* @type {Readonly<"fallback-module">}
|
|
89
71
|
* This is the module type used for the ModuleFederation feature's FallbackModule class.
|
|
90
72
|
* TODO: Document this better.
|
|
91
73
|
*/
|
|
92
|
-
|
|
74
|
+
exports.WEBPACK_MODULE_TYPE_FALLBACK = "fallback-module";
|
|
93
75
|
/**
|
|
94
|
-
* @type {Readonly<"remote-module">}
|
|
95
76
|
* This is the module type used for the ModuleFederation feature's RemoteModule class.
|
|
96
77
|
* TODO: Document this better.
|
|
97
78
|
*/
|
|
98
|
-
|
|
79
|
+
exports.WEBPACK_MODULE_TYPE_REMOTE = "remote-module";
|
|
99
80
|
/**
|
|
100
|
-
* @type {Readonly<"provide-module">}
|
|
101
81
|
* This is the module type used for the ModuleFederation feature's ProvideModule class.
|
|
102
82
|
* TODO: Document this better.
|
|
103
83
|
*/
|
|
104
|
-
|
|
84
|
+
exports.WEBPACK_MODULE_TYPE_PROVIDE = "provide-module";
|
|
105
85
|
/**
|
|
106
|
-
* @type {Readonly<"consume-shared-module">}
|
|
107
86
|
* This is the module type used for the ModuleFederation feature's ConsumeSharedModule class.
|
|
108
87
|
*/
|
|
109
|
-
|
|
88
|
+
exports.WEBPACK_MODULE_TYPE_CONSUME_SHARED_MODULE = "consume-shared-module";
|
|
110
89
|
/**
|
|
111
|
-
* @type {Readonly<"lazy-compilation-proxy">}
|
|
112
90
|
* Module type used for `experiments.lazyCompilation` feature. See `LazyCompilationPlugin` for more information.
|
|
113
91
|
*/
|
|
114
|
-
|
|
115
|
-
/** @typedef {"javascript/auto" | "javascript/dynamic" | "javascript/esm"} JavaScriptModuleTypes */
|
|
116
|
-
/** @typedef {"json"} JSONModuleType */
|
|
117
|
-
/** @typedef {"webassembly/async" | "webassembly/sync"} WebAssemblyModuleTypes */
|
|
118
|
-
/** @typedef {"css" | "css/global" | "css/module"} CSSModuleTypes */
|
|
119
|
-
/** @typedef {"asset" | "asset/inline" | "asset/resource" | "asset/source" | "asset/raw-data-url"} AssetModuleTypes */
|
|
120
|
-
/** @typedef {"runtime" | "fallback-module" | "remote-module" | "provide-module" | "consume-shared-module" | "lazy-compilation-proxy"} WebpackModuleTypes */
|
|
121
|
-
/** @typedef {string} UnknownModuleTypes */
|
|
122
|
-
/** @typedef {JavaScriptModuleTypes | JSONModuleType | WebAssemblyModuleTypes | CSSModuleTypes | AssetModuleTypes | WebpackModuleTypes | UnknownModuleTypes} ModuleTypes */
|
|
123
|
-
exports.ASSET_MODULE_TYPE = ASSET_MODULE_TYPE;
|
|
124
|
-
exports.ASSET_MODULE_TYPE_RAW_DATA_URL = ASSET_MODULE_TYPE_RAW_DATA_URL;
|
|
125
|
-
exports.ASSET_MODULE_TYPE_SOURCE = ASSET_MODULE_TYPE_SOURCE;
|
|
126
|
-
exports.ASSET_MODULE_TYPE_RESOURCE = ASSET_MODULE_TYPE_RESOURCE;
|
|
127
|
-
exports.ASSET_MODULE_TYPE_INLINE = ASSET_MODULE_TYPE_INLINE;
|
|
128
|
-
exports.JAVASCRIPT_MODULE_TYPE_AUTO = JAVASCRIPT_MODULE_TYPE_AUTO;
|
|
129
|
-
exports.JAVASCRIPT_MODULE_TYPE_DYNAMIC = JAVASCRIPT_MODULE_TYPE_DYNAMIC;
|
|
130
|
-
exports.JAVASCRIPT_MODULE_TYPE_ESM = JAVASCRIPT_MODULE_TYPE_ESM;
|
|
131
|
-
exports.JSON_MODULE_TYPE = JSON_MODULE_TYPE;
|
|
132
|
-
exports.WEBASSEMBLY_MODULE_TYPE_ASYNC = WEBASSEMBLY_MODULE_TYPE_ASYNC;
|
|
133
|
-
exports.WEBASSEMBLY_MODULE_TYPE_SYNC = WEBASSEMBLY_MODULE_TYPE_SYNC;
|
|
134
|
-
exports.CSS_MODULE_TYPE = CSS_MODULE_TYPE;
|
|
135
|
-
exports.CSS_MODULE_TYPE_GLOBAL = CSS_MODULE_TYPE_GLOBAL;
|
|
136
|
-
exports.CSS_MODULE_TYPE_MODULE = CSS_MODULE_TYPE_MODULE;
|
|
137
|
-
exports.CSS_MODULE_TYPE_AUTO = CSS_MODULE_TYPE_AUTO;
|
|
138
|
-
exports.WEBPACK_MODULE_TYPE_RUNTIME = WEBPACK_MODULE_TYPE_RUNTIME;
|
|
139
|
-
exports.WEBPACK_MODULE_TYPE_FALLBACK = WEBPACK_MODULE_TYPE_FALLBACK;
|
|
140
|
-
exports.WEBPACK_MODULE_TYPE_REMOTE = WEBPACK_MODULE_TYPE_REMOTE;
|
|
141
|
-
exports.WEBPACK_MODULE_TYPE_PROVIDE = WEBPACK_MODULE_TYPE_PROVIDE;
|
|
142
|
-
exports.WEBPACK_MODULE_TYPE_CONSUME_SHARED_MODULE =
|
|
143
|
-
WEBPACK_MODULE_TYPE_CONSUME_SHARED_MODULE;
|
|
144
|
-
exports.WEBPACK_MODULE_TYPE_LAZY_COMPILATION_PROXY =
|
|
145
|
-
WEBPACK_MODULE_TYPE_LAZY_COMPILATION_PROXY;
|
|
92
|
+
exports.WEBPACK_MODULE_TYPE_LAZY_COMPILATION_PROXY = "lazy-compilation-proxy";
|
package/dist/NormalModule.d.ts
CHANGED
package/dist/NormalModule.js
CHANGED
package/dist/Stats.js
CHANGED
|
@@ -99,13 +99,11 @@ _Stats_inner = new WeakMap(), _Stats_innerMap = new WeakMap(), _Stats_instances
|
|
|
99
99
|
function normalizeStatsPreset(options) {
|
|
100
100
|
if (typeof options === "boolean" || typeof options === "string")
|
|
101
101
|
return presetToOptions(options);
|
|
102
|
-
|
|
102
|
+
if (!options)
|
|
103
103
|
return {};
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
return obj;
|
|
108
|
-
}
|
|
104
|
+
const obj = { ...presetToOptions(options.preset), ...options };
|
|
105
|
+
delete obj.preset;
|
|
106
|
+
return obj;
|
|
109
107
|
}
|
|
110
108
|
exports.normalizeStatsPreset = normalizeStatsPreset;
|
|
111
109
|
function presetToOptions(name) {
|
package/dist/Template.d.ts
CHANGED
|
@@ -1,193 +1,77 @@
|
|
|
1
|
-
export = Template;
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* @property {DependencyTemplates} dependencyTemplates
|
|
11
|
-
* @property {RuntimeTemplate} runtimeTemplate
|
|
12
|
-
* @property {ModuleGraph} moduleGraph
|
|
13
|
-
* @property {ChunkGraph} chunkGraph
|
|
14
|
-
*/
|
|
15
|
-
/** @typedef {RenderManifestEntryTemplated | RenderManifestEntryStatic} RenderManifestEntry */
|
|
16
|
-
/**
|
|
17
|
-
* @typedef {Object} RenderManifestEntryTemplated
|
|
18
|
-
* @property {function(): Source} render
|
|
19
|
-
* @property {string | function(PathData, AssetInfo=): string} filenameTemplate
|
|
20
|
-
* @property {PathData=} pathOptions
|
|
21
|
-
* @property {AssetInfo=} info
|
|
22
|
-
* @property {string} identifier
|
|
23
|
-
* @property {string=} hash
|
|
24
|
-
* @property {boolean=} auxiliary
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* @typedef {Object} RenderManifestEntryStatic
|
|
28
|
-
* @property {function(): Source} render
|
|
29
|
-
* @property {string} filename
|
|
30
|
-
* @property {AssetInfo} info
|
|
31
|
-
* @property {string} identifier
|
|
32
|
-
* @property {string=} hash
|
|
33
|
-
* @property {boolean=} auxiliary
|
|
34
|
-
*/
|
|
35
|
-
/**
|
|
36
|
-
* @typedef {Object} HasId
|
|
37
|
-
* @property {number | string} id
|
|
38
|
-
*/
|
|
39
|
-
/**
|
|
40
|
-
* @typedef {function(Module, number): boolean} ModuleFilterPredicate
|
|
2
|
+
* The following code is modified based on
|
|
3
|
+
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/Template.js
|
|
4
|
+
*
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
* Author Tobias Koppers @sokra
|
|
7
|
+
* Copyright (c) JS Foundation and other contributors
|
|
8
|
+
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
41
9
|
*/
|
|
42
10
|
declare class Template {
|
|
43
11
|
/**
|
|
44
12
|
*
|
|
45
|
-
* @param
|
|
46
|
-
* @returns
|
|
13
|
+
* @param fn a runtime function (.runtime.js) "template"
|
|
14
|
+
* @returns the updated and normalized function string
|
|
47
15
|
*/
|
|
48
16
|
static getFunctionContent(fn: Function): string;
|
|
49
17
|
/**
|
|
50
|
-
* @param
|
|
51
|
-
* @returns
|
|
18
|
+
* @param str the string converted to identifier
|
|
19
|
+
* @returns created identifier
|
|
52
20
|
*/
|
|
53
21
|
static toIdentifier(str: any): string;
|
|
54
22
|
/**
|
|
55
23
|
*
|
|
56
|
-
* @param
|
|
57
|
-
* @returns
|
|
24
|
+
* @param str string to be converted to commented in bundle code
|
|
25
|
+
* @returns returns a commented version of string
|
|
58
26
|
*/
|
|
59
27
|
static toComment(str: string): string;
|
|
60
28
|
/**
|
|
61
29
|
*
|
|
62
|
-
* @param
|
|
63
|
-
* @returns
|
|
30
|
+
* @param str string to be converted to "normal comment"
|
|
31
|
+
* @returns returns a commented version of string
|
|
64
32
|
*/
|
|
65
33
|
static toNormalComment(str: string): string;
|
|
66
34
|
/**
|
|
67
|
-
* @param
|
|
68
|
-
* @returns
|
|
35
|
+
* @param str string path to be normalized
|
|
36
|
+
* @returns normalized bundle-safe path
|
|
69
37
|
*/
|
|
70
38
|
static toPath(str: string): string;
|
|
71
39
|
/**
|
|
72
|
-
* @param
|
|
73
|
-
* @returns
|
|
40
|
+
* @param n number to convert to ident
|
|
41
|
+
* @returns returns single character ident
|
|
74
42
|
*/
|
|
75
43
|
static numberToIdentifier(n: number): string;
|
|
76
44
|
/**
|
|
77
|
-
* @param
|
|
78
|
-
* @returns
|
|
45
|
+
* @param n number to convert to ident
|
|
46
|
+
* @returns returns single character ident
|
|
79
47
|
*/
|
|
80
48
|
static numberToIdentifierContinuation(n: number): string;
|
|
81
49
|
/**
|
|
82
50
|
*
|
|
83
|
-
* @param
|
|
84
|
-
* @returns
|
|
51
|
+
* @param s string to convert to identity
|
|
52
|
+
* @returns converted identity
|
|
85
53
|
*/
|
|
86
54
|
static indent(s: string | string[]): string;
|
|
87
55
|
/**
|
|
88
56
|
*
|
|
89
|
-
* @param
|
|
90
|
-
* @param
|
|
91
|
-
* @returns
|
|
57
|
+
* @param s string to create prefix for
|
|
58
|
+
* @param prefix prefix to compose
|
|
59
|
+
* @returns returns new prefix string
|
|
92
60
|
*/
|
|
93
61
|
static prefix(s: string | string[], prefix: string): string;
|
|
94
62
|
/**
|
|
95
63
|
*
|
|
96
|
-
* @param
|
|
97
|
-
* @returns
|
|
64
|
+
* @param str string or string collection
|
|
65
|
+
* @returns returns a single string from array
|
|
98
66
|
*/
|
|
99
67
|
static asString(str: string | string[]): string;
|
|
100
68
|
/**
|
|
101
|
-
* @
|
|
102
|
-
* @
|
|
103
|
-
*/
|
|
104
|
-
/**
|
|
105
|
-
* @param {WithId[]} modules a collection of modules to get array bounds for
|
|
106
|
-
* @returns {[number, number] | false} returns the upper and lower array bounds
|
|
69
|
+
* @param modules a collection of modules to get array bounds for
|
|
70
|
+
* @returns returns the upper and lower array bounds
|
|
107
71
|
* or false if not every module has a number based id
|
|
108
72
|
*/
|
|
109
73
|
static getModulesArrayBounds(modules: {
|
|
110
74
|
id: string | number;
|
|
111
75
|
}[]): [number, number] | false;
|
|
112
|
-
/**
|
|
113
|
-
* @param {ChunkRenderContext} renderContext render context
|
|
114
|
-
* @param {Module[]} modules modules to render (should be ordered by identifier)
|
|
115
|
-
* @param {function(Module): Source} renderModule function to render a module
|
|
116
|
-
* @param {string=} prefix applying prefix strings
|
|
117
|
-
* @returns {Source | null} rendered chunk modules in a Source object or null if no modules
|
|
118
|
-
*/
|
|
119
|
-
static renderChunkModules(renderContext: ChunkRenderContext, modules: Module[], renderModule: (arg0: Module) => Source, prefix?: string | undefined): Source | null;
|
|
120
|
-
/**
|
|
121
|
-
* @param {RuntimeModule[]} runtimeModules array of runtime modules in order
|
|
122
|
-
* @param {RenderContext & { codeGenerationResults?: CodeGenerationResults }} renderContext render context
|
|
123
|
-
* @returns {Source} rendered runtime modules in a Source object
|
|
124
|
-
*/
|
|
125
|
-
static renderRuntimeModules(runtimeModules: RuntimeModule[], renderContext: RenderContext & {
|
|
126
|
-
codeGenerationResults?: CodeGenerationResults;
|
|
127
|
-
}): Source;
|
|
128
|
-
/**
|
|
129
|
-
* @param {RuntimeModule[]} runtimeModules array of runtime modules in order
|
|
130
|
-
* @param {RenderContext} renderContext render context
|
|
131
|
-
* @returns {Source} rendered chunk runtime modules in a Source object
|
|
132
|
-
*/
|
|
133
|
-
static renderChunkRuntimeModules(runtimeModules: RuntimeModule[], renderContext: RenderContext): Source;
|
|
134
|
-
}
|
|
135
|
-
declare namespace Template {
|
|
136
|
-
export { NUMBER_OF_IDENTIFIER_START_CHARS, NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS, Source, OutputOptions, Chunk, ChunkGraph, CodeGenerationResults, AssetInfo, PathData, DependencyTemplates, Module, ModuleGraph, ModuleTemplate, RuntimeModule, RuntimeTemplate, ChunkRenderContext, RenderContext, RenderManifestOptions, RenderManifestEntry, RenderManifestEntryTemplated, RenderManifestEntryStatic, HasId, ModuleFilterPredicate };
|
|
137
76
|
}
|
|
138
|
-
|
|
139
|
-
type Module = any;
|
|
140
|
-
type Source = import("../compiled/webpack-sources").Source;
|
|
141
|
-
type RuntimeModule = any;
|
|
142
|
-
type RenderContext = any;
|
|
143
|
-
type CodeGenerationResults = any;
|
|
144
|
-
declare const NUMBER_OF_IDENTIFIER_START_CHARS: number;
|
|
145
|
-
declare const NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS: number;
|
|
146
|
-
type OutputOptions = any;
|
|
147
|
-
type Chunk = any;
|
|
148
|
-
type ChunkGraph = any;
|
|
149
|
-
type AssetInfo = any;
|
|
150
|
-
type PathData = any;
|
|
151
|
-
type DependencyTemplates = any;
|
|
152
|
-
type ModuleGraph = any;
|
|
153
|
-
type ModuleTemplate = any;
|
|
154
|
-
type RuntimeTemplate = any;
|
|
155
|
-
type RenderManifestOptions = {
|
|
156
|
-
/**
|
|
157
|
-
* the chunk used to render
|
|
158
|
-
*/
|
|
159
|
-
chunk: Chunk;
|
|
160
|
-
hash: string;
|
|
161
|
-
fullHash: string;
|
|
162
|
-
outputOptions: OutputOptions;
|
|
163
|
-
codeGenerationResults: CodeGenerationResults;
|
|
164
|
-
moduleTemplates: {
|
|
165
|
-
javascript: ModuleTemplate;
|
|
166
|
-
};
|
|
167
|
-
dependencyTemplates: DependencyTemplates;
|
|
168
|
-
runtimeTemplate: RuntimeTemplate;
|
|
169
|
-
moduleGraph: ModuleGraph;
|
|
170
|
-
chunkGraph: ChunkGraph;
|
|
171
|
-
};
|
|
172
|
-
type RenderManifestEntry = RenderManifestEntryTemplated | RenderManifestEntryStatic;
|
|
173
|
-
type RenderManifestEntryTemplated = {
|
|
174
|
-
render: () => Source;
|
|
175
|
-
filenameTemplate: string | ((arg0: PathData, arg1: AssetInfo | undefined) => string);
|
|
176
|
-
pathOptions?: PathData | undefined;
|
|
177
|
-
info?: AssetInfo | undefined;
|
|
178
|
-
identifier: string;
|
|
179
|
-
hash?: string | undefined;
|
|
180
|
-
auxiliary?: boolean | undefined;
|
|
181
|
-
};
|
|
182
|
-
type RenderManifestEntryStatic = {
|
|
183
|
-
render: () => Source;
|
|
184
|
-
filename: string;
|
|
185
|
-
info: AssetInfo;
|
|
186
|
-
identifier: string;
|
|
187
|
-
hash?: string | undefined;
|
|
188
|
-
auxiliary?: boolean | undefined;
|
|
189
|
-
};
|
|
190
|
-
type HasId = {
|
|
191
|
-
id: number | string;
|
|
192
|
-
};
|
|
193
|
-
type ModuleFilterPredicate = (arg0: Module, arg1: number) => boolean;
|
|
77
|
+
export { Template };
|