mirror of https://github.com/webpack/webpack.git
fix crash because for invalid type
This commit is contained in:
parent
b1a742225d
commit
f2ed7ca3e3
|
|
@ -580,13 +580,15 @@ class RuntimeTemplate {
|
|||
}) {
|
||||
if (runtimeCondition === undefined) return "true";
|
||||
if (typeof runtimeCondition === "boolean") return `${runtimeCondition}`;
|
||||
/** @type {Set<string>} */
|
||||
const positiveRuntimeIds = new Set();
|
||||
forEachRuntime(runtimeCondition, runtime =>
|
||||
positiveRuntimeIds.add(chunkGraph.getRuntimeId(runtime))
|
||||
positiveRuntimeIds.add(`${chunkGraph.getRuntimeId(runtime)}`)
|
||||
);
|
||||
/** @type {Set<string>} */
|
||||
const negativeRuntimeIds = new Set();
|
||||
forEachRuntime(subtractRuntime(runtime, runtimeCondition), runtime =>
|
||||
negativeRuntimeIds.add(chunkGraph.getRuntimeId(runtime))
|
||||
negativeRuntimeIds.add(`${chunkGraph.getRuntimeId(runtime)}`)
|
||||
);
|
||||
runtimeRequirements.add(RuntimeGlobals.runtimeId);
|
||||
return compileBooleanMatcher.fromLists(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
return ["shared.js", "a.js", "b.js", "c.js"];
|
||||
return ["shared.js", "a.js", "b.js", "c1.js", "c2.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@ module.exports = {
|
|||
entry: {
|
||||
a: "./a",
|
||||
b: "./b",
|
||||
c: "./c"
|
||||
c1: "./c",
|
||||
c2: "./c"
|
||||
},
|
||||
target: "web",
|
||||
output: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue