webpack 5.90.3 → 5.92.0
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.
Potentially problematic release.
This version of webpack might be problematic. Click here for more details.
- package/README.md +5 -5
- package/bin/webpack.js +6 -3
- package/lib/APIPlugin.js +14 -6
- package/lib/AutomaticPrefetchPlugin.js +1 -1
- package/lib/BannerPlugin.js +3 -1
- package/lib/Cache.js +8 -2
- package/lib/CacheFacade.js +3 -3
- package/lib/Chunk.js +7 -4
- package/lib/ChunkGraph.js +52 -25
- package/lib/ChunkGroup.js +23 -17
- package/lib/CleanPlugin.js +8 -6
- package/lib/Compilation.js +295 -120
- package/lib/Compiler.js +223 -87
- package/lib/ConcatenationScope.js +3 -3
- package/lib/ConditionalInitFragment.js +4 -5
- package/lib/ContextModule.js +95 -41
- package/lib/ContextModuleFactory.js +4 -2
- package/lib/ContextReplacementPlugin.js +3 -2
- package/lib/DefinePlugin.js +18 -6
- package/lib/Dependency.js +12 -10
- package/lib/DependencyTemplate.js +17 -7
- package/lib/DllModule.js +1 -0
- package/lib/DllReferencePlugin.js +7 -3
- package/lib/EntryOptionPlugin.js +4 -1
- package/lib/EntryPlugin.js +6 -1
- package/lib/Entrypoint.js +1 -1
- package/lib/EvalDevToolModulePlugin.js +11 -0
- package/lib/ExportsInfo.js +23 -8
- package/lib/ExternalModule.js +160 -35
- package/lib/ExternalModuleFactoryPlugin.js +37 -2
- package/lib/FileSystemInfo.js +69 -42
- package/lib/FlagDependencyExportsPlugin.js +21 -7
- package/lib/Generator.js +4 -4
- package/lib/HookWebpackError.js +2 -2
- package/lib/HotModuleReplacementPlugin.js +108 -45
- package/lib/IgnorePlugin.js +4 -1
- package/lib/InitFragment.js +5 -3
- package/lib/LibManifestPlugin.js +17 -9
- package/lib/Module.js +41 -14
- package/lib/ModuleFactory.js +3 -3
- package/lib/ModuleFilenameHelpers.js +30 -17
- package/lib/ModuleGraph.js +60 -31
- package/lib/ModuleGraphConnection.js +2 -1
- package/lib/MultiCompiler.js +62 -9
- package/lib/NodeStuffPlugin.js +14 -3
- package/lib/NormalModule.js +13 -13
- package/lib/NormalModuleFactory.js +18 -9
- package/lib/NormalModuleReplacementPlugin.js +5 -1
- package/lib/Parser.js +1 -1
- package/lib/PlatformPlugin.js +39 -0
- package/lib/ProgressPlugin.js +1 -1
- package/lib/ProvidePlugin.js +3 -1
- package/lib/RawModule.js +2 -1
- package/lib/RecordIdsPlugin.js +4 -4
- package/lib/ResolverFactory.js +6 -4
- package/lib/RuntimeModule.js +4 -4
- package/lib/RuntimePlugin.js +1 -0
- package/lib/RuntimeTemplate.js +124 -52
- package/lib/SourceMapDevToolPlugin.js +4 -1
- package/lib/Stats.js +11 -4
- package/lib/Template.js +5 -5
- package/lib/TemplatedPathPlugin.js +48 -7
- package/lib/Watching.js +67 -60
- package/lib/WebpackError.js +6 -6
- package/lib/WebpackOptionsApply.js +18 -5
- package/lib/asset/AssetGenerator.js +15 -0
- package/lib/asset/RawDataUrlModule.js +3 -1
- package/lib/async-modules/AwaitDependenciesInitFragment.js +2 -2
- package/lib/buildChunkGraph.js +120 -67
- package/lib/cache/IdleFileCachePlugin.js +8 -3
- package/lib/cache/MemoryCachePlugin.js +1 -1
- package/lib/cache/MemoryWithGcCachePlugin.js +6 -2
- package/lib/cache/PackFileCacheStrategy.js +51 -18
- package/lib/cache/ResolverCachePlugin.js +22 -14
- package/lib/cache/getLazyHashedEtag.js +2 -2
- package/lib/cli.js +5 -5
- package/lib/config/browserslistTargetHandler.js +7 -1
- package/lib/config/defaults.js +108 -34
- package/lib/config/normalization.js +3 -1
- package/lib/config/target.js +18 -11
- package/lib/container/ContainerEntryDependency.js +2 -1
- package/lib/container/ContainerEntryModule.js +4 -2
- package/lib/container/ContainerPlugin.js +14 -10
- package/lib/container/FallbackModule.js +1 -1
- package/lib/container/RemoteRuntimeModule.js +12 -3
- package/lib/css/CssExportsGenerator.js +68 -25
- package/lib/css/CssGenerator.js +34 -6
- package/lib/css/CssLoadingRuntimeModule.js +217 -98
- package/lib/css/CssModulesPlugin.js +238 -107
- package/lib/css/CssParser.js +24 -15
- package/lib/css/walkCssTokens.js +1 -1
- package/lib/debug/ProfilingPlugin.js +28 -3
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +9 -5
- package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +4 -1
- package/lib/dependencies/CommonJsDependencyHelpers.js +2 -1
- package/lib/dependencies/CommonJsExportRequireDependency.js +33 -18
- package/lib/dependencies/CommonJsExportsDependency.js +13 -5
- package/lib/dependencies/CommonJsExportsParserPlugin.js +20 -15
- package/lib/dependencies/CommonJsImportsParserPlugin.js +1 -2
- package/lib/dependencies/ContextDependencyHelpers.js +49 -29
- package/lib/dependencies/ContextElementDependency.js +8 -1
- package/lib/dependencies/CssExportDependency.js +2 -2
- package/lib/dependencies/CssLocalIdentifierDependency.js +71 -9
- package/lib/dependencies/CssUrlDependency.js +10 -7
- package/lib/dependencies/ExportsInfoDependency.js +5 -4
- package/lib/dependencies/ExternalModuleDependency.js +4 -2
- package/lib/dependencies/ExternalModuleInitFragment.js +5 -3
- package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +4 -4
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +43 -23
- package/lib/dependencies/HarmonyExportHeaderDependency.js +1 -1
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +73 -32
- package/lib/dependencies/HarmonyExportInitFragment.js +10 -2
- package/lib/dependencies/HarmonyImportDependency.js +28 -12
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +70 -19
- package/lib/dependencies/HarmonyImportSideEffectDependency.js +7 -6
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +47 -35
- package/lib/dependencies/ImportDependency.js +9 -2
- package/lib/dependencies/ImportEagerDependency.js +4 -2
- package/lib/dependencies/ImportMetaContextDependency.js +7 -0
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +25 -14
- package/lib/dependencies/ImportMetaPlugin.js +1 -1
- package/lib/dependencies/ImportParserPlugin.js +15 -5
- package/lib/dependencies/ImportWeakDependency.js +4 -2
- package/lib/dependencies/LoaderDependency.js +2 -1
- package/lib/dependencies/LoaderImportDependency.js +2 -1
- package/lib/dependencies/LoaderPlugin.js +2 -2
- package/lib/dependencies/ModuleDependency.js +4 -5
- package/lib/dependencies/PureExpressionDependency.js +64 -47
- package/lib/dependencies/RequireContextPlugin.js +1 -1
- package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +26 -14
- package/lib/dependencies/RequireEnsureDependency.js +1 -1
- package/lib/dependencies/URLDependency.js +7 -4
- package/lib/dependencies/WorkerDependency.js +1 -1
- package/lib/dependencies/WorkerPlugin.js +2 -1
- package/lib/dependencies/getFunctionExpression.js +3 -1
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +92 -3
- package/lib/hmr/LazyCompilationPlugin.js +2 -2
- package/lib/ids/ChunkModuleIdRangePlugin.js +1 -1
- package/lib/ids/DeterministicChunkIdsPlugin.js +1 -1
- package/lib/ids/DeterministicModuleIdsPlugin.js +1 -1
- package/lib/ids/IdHelpers.js +6 -6
- package/lib/ids/NamedChunkIdsPlugin.js +1 -1
- package/lib/ids/NamedModuleIdsPlugin.js +1 -1
- package/lib/ids/SyncModuleIdsPlugin.js +2 -2
- package/lib/index.js +11 -0
- package/lib/javascript/BasicEvaluatedExpression.js +2 -2
- package/lib/javascript/ChunkHelpers.js +2 -2
- package/lib/javascript/CommonJsChunkFormatPlugin.js +1 -1
- package/lib/javascript/JavascriptGenerator.js +0 -1
- package/lib/javascript/JavascriptModulesPlugin.js +174 -17
- package/lib/javascript/JavascriptParser.js +204 -71
- package/lib/javascript/JavascriptParserHelpers.js +1 -1
- package/lib/javascript/StartupHelpers.js +22 -5
- package/lib/library/AbstractLibraryPlugin.js +2 -2
- package/lib/library/AmdLibraryPlugin.js +2 -2
- package/lib/library/AssignLibraryPlugin.js +3 -3
- package/lib/library/ExportPropertyLibraryPlugin.js +2 -2
- package/lib/library/JsonpLibraryPlugin.js +2 -2
- package/lib/library/ModuleLibraryPlugin.js +2 -2
- package/lib/library/SystemLibraryPlugin.js +2 -2
- package/lib/library/UmdLibraryPlugin.js +33 -12
- package/lib/logging/Logger.js +27 -2
- package/lib/logging/createConsoleLogger.js +13 -9
- package/lib/node/CommonJsChunkLoadingPlugin.js +2 -1
- package/lib/node/NodeEnvironmentPlugin.js +14 -8
- package/lib/node/NodeTemplatePlugin.js +1 -1
- package/lib/node/NodeWatchFileSystem.js +37 -26
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +2 -1
- package/lib/node/ReadFileCompileWasmPlugin.js +1 -1
- package/lib/node/RequireChunkLoadingRuntimeModule.js +2 -1
- package/lib/node/nodeConsole.js +24 -1
- package/lib/optimize/AggressiveMergingPlugin.js +1 -1
- package/lib/optimize/AggressiveSplittingPlugin.js +1 -0
- package/lib/optimize/ConcatenatedModule.js +140 -121
- package/lib/optimize/EnsureChunkConditionsPlugin.js +1 -1
- package/lib/optimize/InnerGraph.js +8 -3
- package/lib/optimize/InnerGraphPlugin.js +36 -13
- package/lib/optimize/LimitChunkCountPlugin.js +1 -2
- package/lib/optimize/ModuleConcatenationPlugin.js +13 -3
- package/lib/optimize/RealContentHashPlugin.js +3 -3
- package/lib/optimize/RemoveParentModulesPlugin.js +1 -0
- package/lib/optimize/RuntimeChunkPlugin.js +6 -1
- package/lib/optimize/SideEffectsFlagPlugin.js +48 -17
- package/lib/optimize/SplitChunksPlugin.js +10 -10
- package/lib/performance/SizeLimitsPlugin.js +13 -2
- package/lib/rules/ObjectMatcherRulePlugin.js +15 -1
- package/lib/rules/RuleSetCompiler.js +9 -7
- package/lib/runtime/EnsureChunkRuntimeModule.js +2 -1
- package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +2 -1
- package/lib/runtime/LoadScriptRuntimeModule.js +1 -1
- package/lib/runtime/StartupChunkDependenciesPlugin.js +1 -1
- package/lib/schemes/HttpUriPlugin.js +1 -1
- package/lib/serialization/BinaryMiddleware.js +4 -4
- package/lib/serialization/FileMiddleware.js +4 -3
- package/lib/serialization/NullPrototypeObjectSerializer.js +2 -2
- package/lib/serialization/ObjectMiddleware.js +8 -5
- package/lib/serialization/PlainObjectSerializer.js +2 -2
- package/lib/serialization/Serializer.js +19 -0
- package/lib/serialization/SerializerMiddleware.js +2 -2
- package/lib/serialization/SingleItemMiddleware.js +2 -2
- package/lib/serialization/types.js +1 -1
- package/lib/sharing/ConsumeSharedModule.js +2 -2
- package/lib/sharing/ConsumeSharedPlugin.js +17 -3
- package/lib/sharing/ConsumeSharedRuntimeModule.js +9 -2
- package/lib/sharing/ProvideSharedPlugin.js +13 -6
- package/lib/sharing/resolveMatchedConfigs.js +3 -3
- package/lib/sharing/utils.js +13 -6
- package/lib/stats/DefaultStatsFactoryPlugin.js +20 -20
- package/lib/stats/DefaultStatsPrinterPlugin.js +1 -1
- package/lib/stats/StatsFactory.js +2 -2
- package/lib/stats/StatsPrinter.js +6 -6
- package/lib/util/ArrayQueue.js +14 -21
- package/lib/util/AsyncQueue.js +1 -1
- package/lib/util/Queue.js +8 -2
- package/lib/util/SortableSet.js +16 -4
- package/lib/util/StackedCacheMap.js +26 -0
- package/lib/util/TupleQueue.js +8 -2
- package/lib/util/WeakTupleMap.js +57 -13
- package/lib/util/binarySearchBounds.js +1 -1
- package/lib/util/cleverMerge.js +26 -13
- package/lib/util/comparators.js +37 -15
- package/lib/util/conventions.js +129 -0
- package/lib/util/createHash.js +3 -5
- package/lib/util/deprecation.js +3 -3
- package/lib/util/deterministicGrouping.js +2 -2
- package/lib/util/findGraphRoots.js +1 -1
- package/lib/util/fs.js +383 -69
- package/lib/util/hash/BatchedHash.js +3 -0
- package/lib/util/hash/xxhash64.js +2 -2
- package/lib/util/identifier.js +5 -5
- package/lib/util/mergeScope.js +79 -0
- package/lib/util/runtime.js +2 -17
- package/lib/util/semver.js +3 -0
- package/lib/util/smartGrouping.js +3 -3
- package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +4 -2
- package/lib/wasm-async/AsyncWebAssemblyGenerator.js +1 -1
- package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +4 -2
- package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +3 -3
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +16 -7
- package/lib/wasm-sync/WebAssemblyGenerator.js +40 -19
- package/lib/wasm-sync/WebAssemblyModulesPlugin.js +1 -1
- package/lib/wasm-sync/WebAssemblyParser.js +7 -4
- package/lib/wasm-sync/WebAssemblyUtils.js +2 -1
- package/lib/web/FetchCompileWasmPlugin.js +1 -1
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +3 -2
- package/lib/webpack.js +19 -6
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +2 -1
- package/package.json +40 -39
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +97 -8
- package/schemas/plugins/BannerPlugin.check.js +1 -1
- package/schemas/plugins/BannerPlugin.json +5 -1
- package/schemas/plugins/css/CssAutoGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssGlobalGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssModuleGeneratorOptions.check.js +1 -1
- package/types.d.ts +1826 -639
@@ -7,14 +7,16 @@
|
|
7
7
|
|
8
8
|
const { UsageState } = require("../ExportsInfo");
|
9
9
|
const makeSerializable = require("../util/makeSerializable");
|
10
|
-
const { filterRuntime,
|
10
|
+
const { filterRuntime, runtimeToString } = require("../util/runtime");
|
11
11
|
const NullDependency = require("./NullDependency");
|
12
12
|
|
13
13
|
/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */
|
14
14
|
/** @typedef {import("../ChunkGraph")} ChunkGraph */
|
15
15
|
/** @typedef {import("../Dependency")} Dependency */
|
16
|
+
/** @typedef {import("../Dependency").RuntimeSpec} RuntimeSpec */
|
16
17
|
/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */
|
17
18
|
/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */
|
19
|
+
/** @typedef {import("../Module")} Module */
|
18
20
|
/** @typedef {import("../ModuleGraph")} ModuleGraph */
|
19
21
|
/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */
|
20
22
|
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
|
@@ -31,7 +33,31 @@ class PureExpressionDependency extends NullDependency {
|
|
31
33
|
this.range = range;
|
32
34
|
/** @type {Set<string> | false} */
|
33
35
|
this.usedByExports = false;
|
34
|
-
|
36
|
+
}
|
37
|
+
|
38
|
+
/**
|
39
|
+
* @param {ModuleGraph} moduleGraph module graph
|
40
|
+
* @param {RuntimeSpec} runtime current runtimes
|
41
|
+
* @returns {boolean | RuntimeSpec} runtime condition
|
42
|
+
*/
|
43
|
+
_getRuntimeCondition(moduleGraph, runtime) {
|
44
|
+
const usedByExports = this.usedByExports;
|
45
|
+
if (usedByExports !== false) {
|
46
|
+
const selfModule =
|
47
|
+
/** @type {Module} */
|
48
|
+
(moduleGraph.getParentModule(this));
|
49
|
+
const exportsInfo = moduleGraph.getExportsInfo(selfModule);
|
50
|
+
const runtimeCondition = filterRuntime(runtime, runtime => {
|
51
|
+
for (const exportName of usedByExports) {
|
52
|
+
if (exportsInfo.getUsed(exportName, runtime) !== UsageState.Unused) {
|
53
|
+
return true;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
return false;
|
57
|
+
});
|
58
|
+
return runtimeCondition;
|
59
|
+
}
|
60
|
+
return false;
|
35
61
|
}
|
36
62
|
|
37
63
|
/**
|
@@ -41,10 +67,22 @@ class PureExpressionDependency extends NullDependency {
|
|
41
67
|
* @returns {void}
|
42
68
|
*/
|
43
69
|
updateHash(hash, context) {
|
44
|
-
|
45
|
-
|
70
|
+
const runtimeCondition = this._getRuntimeCondition(
|
71
|
+
context.chunkGraph.moduleGraph,
|
72
|
+
context.runtime
|
73
|
+
);
|
74
|
+
if (runtimeCondition === true) {
|
75
|
+
return;
|
76
|
+
} else if (runtimeCondition === false) {
|
77
|
+
hash.update("null");
|
78
|
+
} else {
|
79
|
+
hash.update(
|
80
|
+
runtimeToString(runtimeCondition) +
|
81
|
+
"|" +
|
82
|
+
runtimeToString(context.runtime)
|
83
|
+
);
|
46
84
|
}
|
47
|
-
hash.update(this.
|
85
|
+
hash.update(this.range + "");
|
48
86
|
}
|
49
87
|
|
50
88
|
/**
|
@@ -93,52 +131,31 @@ PureExpressionDependency.Template = class PureExpressionDependencyTemplate exten
|
|
93
131
|
apply(
|
94
132
|
dependency,
|
95
133
|
source,
|
96
|
-
{
|
97
|
-
chunkGraph,
|
98
|
-
moduleGraph,
|
99
|
-
runtime,
|
100
|
-
runtimes,
|
101
|
-
runtimeTemplate,
|
102
|
-
runtimeRequirements
|
103
|
-
}
|
134
|
+
{ chunkGraph, moduleGraph, runtime, runtimeTemplate, runtimeRequirements }
|
104
135
|
) {
|
105
136
|
const dep = /** @type {PureExpressionDependency} */ (dependency);
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
137
|
+
const runtimeCondition = dep._getRuntimeCondition(moduleGraph, runtime);
|
138
|
+
if (runtimeCondition === true) {
|
139
|
+
return;
|
140
|
+
} else if (runtimeCondition === false) {
|
141
|
+
source.insert(
|
142
|
+
dep.range[0],
|
143
|
+
`(/* unused pure expression or super */ null && (`
|
144
|
+
);
|
145
|
+
source.insert(dep.range[1], "))");
|
146
|
+
} else {
|
147
|
+
const condition = runtimeTemplate.runtimeConditionExpression({
|
148
|
+
chunkGraph,
|
149
|
+
runtime,
|
150
|
+
runtimeCondition,
|
151
|
+
runtimeRequirements
|
119
152
|
});
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
runtimeCondition,
|
126
|
-
runtimeRequirements
|
127
|
-
});
|
128
|
-
source.insert(
|
129
|
-
dep.range[0],
|
130
|
-
`(/* runtime-dependent pure expression or super */ ${condition} ? (`
|
131
|
-
);
|
132
|
-
source.insert(dep.range[1], ") : null)");
|
133
|
-
return;
|
134
|
-
}
|
153
|
+
source.insert(
|
154
|
+
dep.range[0],
|
155
|
+
`(/* runtime-dependent pure expression or super */ ${condition} ? (`
|
156
|
+
);
|
157
|
+
source.insert(dep.range[1], ") : null)");
|
135
158
|
}
|
136
|
-
|
137
|
-
source.insert(
|
138
|
-
dep.range[0],
|
139
|
-
`(/* unused pure expression or super */ null && (`
|
140
|
-
);
|
141
|
-
source.insert(dep.range[1], "))");
|
142
159
|
}
|
143
160
|
};
|
144
161
|
|
@@ -11,9 +11,16 @@ const RequireEnsureItemDependency = require("./RequireEnsureItemDependency");
|
|
11
11
|
const getFunctionExpression = require("./getFunctionExpression");
|
12
12
|
|
13
13
|
/** @typedef {import("../ChunkGroup").ChunkGroupOptions} ChunkGroupOptions */
|
14
|
+
/** @typedef {import("../Dependency").DependencyLocation} DependencyLocation */
|
15
|
+
/** @typedef {import("../javascript/BasicEvaluatedExpression")} BasicEvaluatedExpression */
|
14
16
|
/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */
|
17
|
+
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
|
15
18
|
|
16
19
|
module.exports = class RequireEnsureDependenciesBlockParserPlugin {
|
20
|
+
/**
|
21
|
+
* @param {JavascriptParser} parser the parser
|
22
|
+
* @returns {void}
|
23
|
+
*/
|
17
24
|
apply(parser) {
|
18
25
|
parser.hooks.call
|
19
26
|
.for("require.ensure")
|
@@ -45,9 +52,12 @@ module.exports = class RequireEnsureDependenciesBlockParserPlugin {
|
|
45
52
|
const dependenciesExpr = parser.evaluateExpression(
|
46
53
|
expr.arguments[0]
|
47
54
|
);
|
48
|
-
const dependenciesItems =
|
49
|
-
|
50
|
-
|
55
|
+
const dependenciesItems =
|
56
|
+
/** @type {BasicEvaluatedExpression[]} */ (
|
57
|
+
dependenciesExpr.isArray()
|
58
|
+
? dependenciesExpr.items
|
59
|
+
: [dependenciesExpr]
|
60
|
+
);
|
51
61
|
const successExpressionArg = expr.arguments[1];
|
52
62
|
const successExpression =
|
53
63
|
getFunctionExpression(successExpressionArg);
|
@@ -60,32 +70,34 @@ module.exports = class RequireEnsureDependenciesBlockParserPlugin {
|
|
60
70
|
}
|
61
71
|
|
62
72
|
const depBlock = new RequireEnsureDependenciesBlock(
|
63
|
-
/** @type {ChunkGroupOptions & { entryOptions?: TODO }} */
|
64
|
-
|
65
|
-
)
|
66
|
-
expr.loc
|
73
|
+
/** @type {ChunkGroupOptions & { entryOptions?: TODO }} */
|
74
|
+
(chunkName),
|
75
|
+
/** @type {DependencyLocation} */ (expr.loc)
|
67
76
|
);
|
68
77
|
const errorCallbackExists =
|
69
78
|
expr.arguments.length === 4 ||
|
70
79
|
(!chunkName && expr.arguments.length === 3);
|
71
80
|
const dep = new RequireEnsureDependency(
|
72
|
-
expr.range,
|
73
|
-
expr.arguments[1].range,
|
74
|
-
errorCallbackExists &&
|
81
|
+
/** @type {Range} */ (expr.range),
|
82
|
+
/** @type {Range} */ (expr.arguments[1].range),
|
83
|
+
errorCallbackExists &&
|
84
|
+
/** @type {Range} */ (expr.arguments[2].range)
|
75
85
|
);
|
76
|
-
dep.loc = expr.loc;
|
86
|
+
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
|
77
87
|
depBlock.addDependency(dep);
|
78
88
|
const old = parser.state.current;
|
79
|
-
parser.state.current = depBlock;
|
89
|
+
parser.state.current = /** @type {TODO} */ (depBlock);
|
80
90
|
try {
|
81
91
|
let failed = false;
|
82
92
|
parser.inScope([], () => {
|
83
93
|
for (const ee of dependenciesItems) {
|
84
94
|
if (ee.isString()) {
|
85
95
|
const ensureDependency = new RequireEnsureItemDependency(
|
86
|
-
ee.string
|
96
|
+
/** @type {string} */ (ee.string)
|
87
97
|
);
|
88
|
-
ensureDependency.loc =
|
98
|
+
ensureDependency.loc =
|
99
|
+
/** @type {DependencyLocation} */
|
100
|
+
(expr.loc);
|
89
101
|
depBlock.addDependency(ensureDependency);
|
90
102
|
} else {
|
91
103
|
failed = true;
|
@@ -21,7 +21,7 @@ class RequireEnsureDependency extends NullDependency {
|
|
21
21
|
/**
|
22
22
|
* @param {Range} range range
|
23
23
|
* @param {Range} contentRange content range
|
24
|
-
* @param {Range} errorHandlerRange error handler range
|
24
|
+
* @param {Range | false} errorHandlerRange error handler range
|
25
25
|
*/
|
26
26
|
constructor(range, contentRange, errorHandlerRange) {
|
27
27
|
super();
|
@@ -6,6 +6,7 @@
|
|
6
6
|
"use strict";
|
7
7
|
|
8
8
|
const RuntimeGlobals = require("../RuntimeGlobals");
|
9
|
+
const RawDataUrlModule = require("../asset/RawDataUrlModule");
|
9
10
|
const {
|
10
11
|
getDependencyUsedByExportsCondition
|
11
12
|
} = require("../optimize/InnerGraph");
|
@@ -16,6 +17,7 @@ const ModuleDependency = require("./ModuleDependency");
|
|
16
17
|
/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */
|
17
18
|
/** @typedef {import("../ChunkGraph")} ChunkGraph */
|
18
19
|
/** @typedef {import("../Dependency")} Dependency */
|
20
|
+
/** @typedef {import("../Dependency").GetConditionFn} GetConditionFn */
|
19
21
|
/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */
|
20
22
|
/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */
|
21
23
|
/** @typedef {import("../Module")} Module */
|
@@ -28,7 +30,9 @@ const ModuleDependency = require("./ModuleDependency");
|
|
28
30
|
/** @typedef {import("../util/Hash")} Hash */
|
29
31
|
/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */
|
30
32
|
|
31
|
-
const
|
33
|
+
const getIgnoredRawDataUrlModule = memoize(() => {
|
34
|
+
return new RawDataUrlModule("data:,", `ignored-asset`, `(ignored asset)`);
|
35
|
+
});
|
32
36
|
|
33
37
|
class URLDependency extends ModuleDependency {
|
34
38
|
/**
|
@@ -56,7 +60,7 @@ class URLDependency extends ModuleDependency {
|
|
56
60
|
|
57
61
|
/**
|
58
62
|
* @param {ModuleGraph} moduleGraph module graph
|
59
|
-
* @returns {null | false |
|
63
|
+
* @returns {null | false | GetConditionFn} function to determine if the connection is active
|
60
64
|
*/
|
61
65
|
getCondition(moduleGraph) {
|
62
66
|
return getDependencyUsedByExportsCondition(
|
@@ -71,8 +75,7 @@ class URLDependency extends ModuleDependency {
|
|
71
75
|
* @returns {Module | null} a module
|
72
76
|
*/
|
73
77
|
createIgnoredModule(context) {
|
74
|
-
|
75
|
-
return new RawDataUrlModule("data:,", `ignored-asset`, `(ignored asset)`);
|
78
|
+
return getIgnoredRawDataUrlModule();
|
76
79
|
}
|
77
80
|
|
78
81
|
/**
|
@@ -28,7 +28,7 @@ class WorkerDependency extends ModuleDependency {
|
|
28
28
|
/**
|
29
29
|
* @param {string} request request
|
30
30
|
* @param {Range} range range
|
31
|
-
* @param {
|
31
|
+
* @param {object} workerDependencyOptions options
|
32
32
|
* @param {string=} workerDependencyOptions.publicPath public path for the worker
|
33
33
|
*/
|
34
34
|
constructor(request, range, workerDependencyOptions) {
|
@@ -369,7 +369,8 @@ class WorkerPlugin {
|
|
369
369
|
);
|
370
370
|
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
|
371
371
|
parser.state.module.addPresentationalDependency(dep);
|
372
|
-
|
372
|
+
/** @type {TODO} */
|
373
|
+
(expressions).type = undefined;
|
373
374
|
}
|
374
375
|
} else if (insertType === "comma") {
|
375
376
|
if (this._module || hasSpreadInOptions) {
|
@@ -5,12 +5,14 @@
|
|
5
5
|
|
6
6
|
"use strict";
|
7
7
|
|
8
|
+
/** @typedef {import("estree").ArrowFunctionExpression} ArrowFunctionExpression */
|
8
9
|
/** @typedef {import("estree").Expression} Expression */
|
10
|
+
/** @typedef {import("estree").FunctionExpression} FunctionExpression */
|
9
11
|
/** @typedef {import("estree").SpreadElement} SpreadElement */
|
10
12
|
|
11
13
|
/**
|
12
14
|
* @param {Expression | SpreadElement} expr expressions
|
13
|
-
* @returns {{fn:
|
15
|
+
* @returns {{fn: FunctionExpression | ArrowFunctionExpression, expressions: (Expression | SpreadElement)[], needThis: boolean | undefined } | undefined} function expression with additional information
|
14
16
|
*/
|
15
17
|
module.exports = expr => {
|
16
18
|
// <FunctionExpression>
|
@@ -19,9 +19,10 @@ const { getUndoPath } = require("../util/identifier");
|
|
19
19
|
|
20
20
|
/** @typedef {import("../Chunk")} Chunk */
|
21
21
|
/** @typedef {import("../ChunkGraph")} ChunkGraph */
|
22
|
+
/** @typedef {import("../Module").ReadOnlyRuntimeRequirements} ReadOnlyRuntimeRequirements */
|
22
23
|
|
23
24
|
/**
|
24
|
-
* @typedef {
|
25
|
+
* @typedef {object} JsonpCompilationPluginHooks
|
25
26
|
* @property {SyncWaterfallHook<[string, Chunk]>} linkPreload
|
26
27
|
* @property {SyncWaterfallHook<[string, Chunk]>} linkPrefetch
|
27
28
|
*/
|
@@ -52,7 +53,7 @@ class ModuleChunkLoadingRuntimeModule extends RuntimeModule {
|
|
52
53
|
}
|
53
54
|
|
54
55
|
/**
|
55
|
-
* @param {
|
56
|
+
* @param {ReadOnlyRuntimeRequirements} runtimeRequirements runtime requirements
|
56
57
|
*/
|
57
58
|
constructor(runtimeRequirements) {
|
58
59
|
super("import chunk loading", RuntimeModule.STAGE_ATTACH);
|
@@ -88,7 +89,7 @@ class ModuleChunkLoadingRuntimeModule extends RuntimeModule {
|
|
88
89
|
const chunk = /** @type {Chunk} */ (this.chunk);
|
89
90
|
const {
|
90
91
|
runtimeTemplate,
|
91
|
-
outputOptions: { importFunctionName }
|
92
|
+
outputOptions: { environment, importFunctionName, crossOriginLoading }
|
92
93
|
} = compilation;
|
93
94
|
const fn = RuntimeGlobals.ensureChunkHandlers;
|
94
95
|
const withBaseURI = this._runtimeRequirements.has(RuntimeGlobals.baseURI);
|
@@ -104,6 +105,14 @@ class ModuleChunkLoadingRuntimeModule extends RuntimeModule {
|
|
104
105
|
const withHmr = this._runtimeRequirements.has(
|
105
106
|
RuntimeGlobals.hmrDownloadUpdateHandlers
|
106
107
|
);
|
108
|
+
const { linkPreload, linkPrefetch } =
|
109
|
+
ModuleChunkLoadingRuntimeModule.getCompilationHooks(compilation);
|
110
|
+
const withPrefetch =
|
111
|
+
environment.document &&
|
112
|
+
this._runtimeRequirements.has(RuntimeGlobals.prefetchChunkHandlers);
|
113
|
+
const withPreload =
|
114
|
+
environment.document &&
|
115
|
+
this._runtimeRequirements.has(RuntimeGlobals.preloadChunkHandlers);
|
107
116
|
const conditionMap = chunkGraph.getChunkConditionMap(chunk, chunkHasJs);
|
108
117
|
const hasJsMatcher = compileBooleanMatcher(conditionMap);
|
109
118
|
const initialChunkIds = getInitialChunkIds(chunk, chunkGraph, chunkHasJs);
|
@@ -228,6 +237,86 @@ class ModuleChunkLoadingRuntimeModule extends RuntimeModule {
|
|
228
237
|
])
|
229
238
|
: "// no chunk on demand loading",
|
230
239
|
"",
|
240
|
+
withPrefetch && hasJsMatcher !== false
|
241
|
+
? `${
|
242
|
+
RuntimeGlobals.prefetchChunkHandlers
|
243
|
+
}.j = ${runtimeTemplate.basicFunction("chunkId", [
|
244
|
+
`if((!${
|
245
|
+
RuntimeGlobals.hasOwnProperty
|
246
|
+
}(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && ${
|
247
|
+
hasJsMatcher === true ? "true" : hasJsMatcher("chunkId")
|
248
|
+
}) {`,
|
249
|
+
Template.indent([
|
250
|
+
"installedChunks[chunkId] = null;",
|
251
|
+
linkPrefetch.call(
|
252
|
+
Template.asString([
|
253
|
+
"var link = document.createElement('link');",
|
254
|
+
crossOriginLoading
|
255
|
+
? `link.crossOrigin = ${JSON.stringify(
|
256
|
+
crossOriginLoading
|
257
|
+
)};`
|
258
|
+
: "",
|
259
|
+
`if (${RuntimeGlobals.scriptNonce}) {`,
|
260
|
+
Template.indent(
|
261
|
+
`link.setAttribute("nonce", ${RuntimeGlobals.scriptNonce});`
|
262
|
+
),
|
263
|
+
"}",
|
264
|
+
'link.rel = "prefetch";',
|
265
|
+
'link.as = "script";',
|
266
|
+
`link.href = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkScriptFilename}(chunkId);`
|
267
|
+
]),
|
268
|
+
chunk
|
269
|
+
),
|
270
|
+
"document.head.appendChild(link);"
|
271
|
+
]),
|
272
|
+
"}"
|
273
|
+
])};`
|
274
|
+
: "// no prefetching",
|
275
|
+
"",
|
276
|
+
withPreload && hasJsMatcher !== false
|
277
|
+
? `${
|
278
|
+
RuntimeGlobals.preloadChunkHandlers
|
279
|
+
}.j = ${runtimeTemplate.basicFunction("chunkId", [
|
280
|
+
`if((!${
|
281
|
+
RuntimeGlobals.hasOwnProperty
|
282
|
+
}(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && ${
|
283
|
+
hasJsMatcher === true ? "true" : hasJsMatcher("chunkId")
|
284
|
+
}) {`,
|
285
|
+
Template.indent([
|
286
|
+
"installedChunks[chunkId] = null;",
|
287
|
+
linkPreload.call(
|
288
|
+
Template.asString([
|
289
|
+
"var link = document.createElement('link');",
|
290
|
+
"link.charset = 'utf-8';",
|
291
|
+
`if (${RuntimeGlobals.scriptNonce}) {`,
|
292
|
+
Template.indent(
|
293
|
+
`link.setAttribute("nonce", ${RuntimeGlobals.scriptNonce});`
|
294
|
+
),
|
295
|
+
"}",
|
296
|
+
'link.rel = "modulepreload";',
|
297
|
+
`link.href = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkScriptFilename}(chunkId);`,
|
298
|
+
crossOriginLoading
|
299
|
+
? crossOriginLoading === "use-credentials"
|
300
|
+
? 'link.crossOrigin = "use-credentials";'
|
301
|
+
: Template.asString([
|
302
|
+
"if (link.href.indexOf(window.location.origin + '/') !== 0) {",
|
303
|
+
Template.indent(
|
304
|
+
`link.crossOrigin = ${JSON.stringify(
|
305
|
+
crossOriginLoading
|
306
|
+
)};`
|
307
|
+
),
|
308
|
+
"}"
|
309
|
+
])
|
310
|
+
: ""
|
311
|
+
]),
|
312
|
+
chunk
|
313
|
+
),
|
314
|
+
"document.head.appendChild(link);"
|
315
|
+
]),
|
316
|
+
"}"
|
317
|
+
])};`
|
318
|
+
: "// no preloaded",
|
319
|
+
"",
|
231
320
|
withExternalInstallChunk
|
232
321
|
? Template.asString([
|
233
322
|
`${RuntimeGlobals.externalInstallChunk} = installChunk;`
|
@@ -38,7 +38,7 @@ const { registerNotSerializable } = require("../util/serialization");
|
|
38
38
|
/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */
|
39
39
|
|
40
40
|
/**
|
41
|
-
* @typedef {
|
41
|
+
* @typedef {object} BackendApi
|
42
42
|
* @property {function(Error=): void} dispose
|
43
43
|
* @property {function(Module): { client: string, data: string, active: boolean }} module
|
44
44
|
*/
|
@@ -319,7 +319,7 @@ class LazyCompilationDependencyFactory extends ModuleFactory {
|
|
319
319
|
|
320
320
|
class LazyCompilationPlugin {
|
321
321
|
/**
|
322
|
-
* @param {
|
322
|
+
* @param {object} options options
|
323
323
|
* @param {(function(Compiler, function(Error?, BackendApi?): void): void) | function(Compiler): Promise<BackendApi>} options.backend the backend
|
324
324
|
* @param {boolean} options.entries true, when entries are lazy compiled
|
325
325
|
* @param {boolean} options.imports true, when import() modules are lazy compiled
|
@@ -14,7 +14,7 @@ const {
|
|
14
14
|
/** @typedef {import("../Compiler")} Compiler */
|
15
15
|
|
16
16
|
/**
|
17
|
-
* @typedef {
|
17
|
+
* @typedef {object} ChunkModuleIdRangePluginOptions
|
18
18
|
* @property {string} name the chunk name
|
19
19
|
* @property {("index" | "index2" | "preOrderIndex" | "postOrderIndex")=} order order
|
20
20
|
* @property {number=} start start id
|
@@ -16,7 +16,7 @@ const {
|
|
16
16
|
/** @typedef {import("../Module")} Module */
|
17
17
|
|
18
18
|
/**
|
19
|
-
* @typedef {
|
19
|
+
* @typedef {object} DeterministicChunkIdsPluginOptions
|
20
20
|
* @property {string=} context context for ids
|
21
21
|
* @property {number=} maxLength maximum length of ids
|
22
22
|
*/
|
@@ -18,7 +18,7 @@ const {
|
|
18
18
|
/** @typedef {import("../Module")} Module */
|
19
19
|
|
20
20
|
/**
|
21
|
-
* @typedef {
|
21
|
+
* @typedef {object} DeterministicModuleIdsPluginOptions
|
22
22
|
* @property {string=} context context relative to which module identifiers are computed
|
23
23
|
* @property {function(Module): boolean=} test selector function for modules
|
24
24
|
* @property {number=} maxLength maximum id length in digits (used as starting point)
|
package/lib/ids/IdHelpers.js
CHANGED
@@ -78,7 +78,7 @@ const shortenLongString = (string, delimiter, hashFunction) => {
|
|
78
78
|
/**
|
79
79
|
* @param {Module} module the module
|
80
80
|
* @param {string} context context directory
|
81
|
-
* @param {
|
81
|
+
* @param {object=} associatedObjectForCache an object to which the cache will be attached
|
82
82
|
* @returns {string} short module name
|
83
83
|
*/
|
84
84
|
const getShortModuleName = (module, context, associatedObjectForCache) => {
|
@@ -98,7 +98,7 @@ exports.getShortModuleName = getShortModuleName;
|
|
98
98
|
* @param {Module} module the module
|
99
99
|
* @param {string} context context directory
|
100
100
|
* @param {string | Hash} hashFunction hash function to use
|
101
|
-
* @param {
|
101
|
+
* @param {object=} associatedObjectForCache an object to which the cache will be attached
|
102
102
|
* @returns {string} long module name
|
103
103
|
*/
|
104
104
|
const getLongModuleName = (
|
@@ -116,7 +116,7 @@ exports.getLongModuleName = getLongModuleName;
|
|
116
116
|
/**
|
117
117
|
* @param {Module} module the module
|
118
118
|
* @param {string} context context directory
|
119
|
-
* @param {
|
119
|
+
* @param {object=} associatedObjectForCache an object to which the cache will be attached
|
120
120
|
* @returns {string} full module name
|
121
121
|
*/
|
122
122
|
const getFullModuleName = (module, context, associatedObjectForCache) => {
|
@@ -134,7 +134,7 @@ exports.getFullModuleName = getFullModuleName;
|
|
134
134
|
* @param {string} context context directory
|
135
135
|
* @param {string} delimiter delimiter for names
|
136
136
|
* @param {string | Hash} hashFunction hash function to use
|
137
|
-
* @param {
|
137
|
+
* @param {object=} associatedObjectForCache an object to which the cache will be attached
|
138
138
|
* @returns {string} short chunk name
|
139
139
|
*/
|
140
140
|
const getShortChunkName = (
|
@@ -164,7 +164,7 @@ exports.getShortChunkName = getShortChunkName;
|
|
164
164
|
* @param {string} context context directory
|
165
165
|
* @param {string} delimiter delimiter for names
|
166
166
|
* @param {string | Hash} hashFunction hash function to use
|
167
|
-
* @param {
|
167
|
+
* @param {object=} associatedObjectForCache an object to which the cache will be attached
|
168
168
|
* @returns {string} short chunk name
|
169
169
|
*/
|
170
170
|
const getLongChunkName = (
|
@@ -197,7 +197,7 @@ exports.getLongChunkName = getLongChunkName;
|
|
197
197
|
* @param {Chunk} chunk the chunk
|
198
198
|
* @param {ChunkGraph} chunkGraph the chunk graph
|
199
199
|
* @param {string} context context directory
|
200
|
-
* @param {
|
200
|
+
* @param {object=} associatedObjectForCache an object to which the cache will be attached
|
201
201
|
* @returns {string} full chunk name
|
202
202
|
*/
|
203
203
|
const getFullChunkName = (
|
@@ -15,7 +15,7 @@ const plugin = "SyncModuleIdsPlugin";
|
|
15
15
|
|
16
16
|
class SyncModuleIdsPlugin {
|
17
17
|
/**
|
18
|
-
* @param {
|
18
|
+
* @param {object} options options
|
19
19
|
* @param {string} options.path path to file
|
20
20
|
* @param {string=} options.context context for module names
|
21
21
|
* @param {function(Module): boolean} options.test selector for modules
|
@@ -63,7 +63,7 @@ class SyncModuleIdsPlugin {
|
|
63
63
|
if (this._write) {
|
64
64
|
compiler.hooks.emitRecords.tapAsync(plugin, callback => {
|
65
65
|
if (!data || !dataChanged) return callback();
|
66
|
-
/** @type {
|
66
|
+
/** @type {{[key: string]: string | number}} */
|
67
67
|
const json = {};
|
68
68
|
const sorted = Array.from(data).sort(([a], [b]) => (a < b ? -1 : 1));
|
69
69
|
for (const [key, value] of sorted) {
|
package/lib/index.js
CHANGED
@@ -60,6 +60,8 @@ const memoize = require("./util/memoize");
|
|
60
60
|
/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsModuleTraceDependency} StatsModuleTraceDependency */
|
61
61
|
/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsModuleTraceItem} StatsModuleTraceItem */
|
62
62
|
/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsProfile} StatsProfile */
|
63
|
+
/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */
|
64
|
+
/** @typedef {import("./util/fs").OutputFileSystem} OutputFileSystem */
|
63
65
|
|
64
66
|
/**
|
65
67
|
* @template {Function} T
|
@@ -221,6 +223,9 @@ module.exports = mergeExports(fn, {
|
|
221
223
|
get HotModuleReplacementPlugin() {
|
222
224
|
return require("./HotModuleReplacementPlugin");
|
223
225
|
},
|
226
|
+
get InitFragment() {
|
227
|
+
return require("./InitFragment");
|
228
|
+
},
|
224
229
|
get IgnorePlugin() {
|
225
230
|
return require("./IgnorePlugin");
|
226
231
|
},
|
@@ -277,6 +282,9 @@ module.exports = mergeExports(fn, {
|
|
277
282
|
get Parser() {
|
278
283
|
return require("./Parser");
|
279
284
|
},
|
285
|
+
get PlatformPlugin() {
|
286
|
+
return require("./PlatformPlugin");
|
287
|
+
},
|
280
288
|
get PrefetchPlugin() {
|
281
289
|
return require("./PrefetchPlugin");
|
282
290
|
},
|
@@ -576,6 +584,9 @@ module.exports = mergeExports(fn, {
|
|
576
584
|
},
|
577
585
|
get LazySet() {
|
578
586
|
return require("./util/LazySet");
|
587
|
+
},
|
588
|
+
get compileBooleanMatcher() {
|
589
|
+
return require("./util/compileBooleanMatcher");
|
579
590
|
}
|
580
591
|
},
|
581
592
|
|
@@ -27,7 +27,7 @@ const TypeBigInt = 13;
|
|
27
27
|
class BasicEvaluatedExpression {
|
28
28
|
constructor() {
|
29
29
|
this.type = TypeUnknown;
|
30
|
-
/** @type {
|
30
|
+
/** @type {Range | undefined} */
|
31
31
|
this.range = undefined;
|
32
32
|
/** @type {boolean} */
|
33
33
|
this.falsy = false;
|
@@ -420,7 +420,7 @@ class BasicEvaluatedExpression {
|
|
420
420
|
*
|
421
421
|
* @param {BasicEvaluatedExpression | null | undefined} prefix Expression to be added before the innerExpressions
|
422
422
|
* @param {BasicEvaluatedExpression | null | undefined} postfix Expression to be added after the innerExpressions
|
423
|
-
* @param {BasicEvaluatedExpression[]} innerExpressions Expressions to be wrapped
|
423
|
+
* @param {BasicEvaluatedExpression[] | undefined} innerExpressions Expressions to be wrapped
|
424
424
|
* @returns {this} this
|
425
425
|
*/
|
426
426
|
setWrapped(prefix, postfix, innerExpressions) {
|