Skip to content

Commit

Permalink
Merge pull request webpack#12565 from webpack/bugfix/12562
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra authored Feb 2, 2021
2 parents 0856214 + e5cca2f commit 5c67208
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 3 deletions.
4 changes: 1 addition & 3 deletions lib/util/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,7 @@ const mergeRuntimeOwned = (a, b) => {
return a;
} else if (a === undefined) {
if (typeof b === "string") {
const set = new SortableSet();
set.add(b);
return set;
return b;
} else {
return new SortableSet(b);
}
Expand Down
1 change: 1 addition & 0 deletions test/configCases/entry/issue-12562/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import("./test.js");
4 changes: 4 additions & 0 deletions test/configCases/entry/issue-12562/home.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import log from "./log";
log("Hi");

it("should load", () => {});
3 changes: 3 additions & 0 deletions test/configCases/entry/issue-12562/log.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function (msg) {
console.log.bind(console, msg);
}
5 changes: 5 additions & 0 deletions test/configCases/entry/issue-12562/test.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
findBundle: function () {
return ["./runtime.js", "./app.js", "./home.js"];
}
};
2 changes: 2 additions & 0 deletions test/configCases/entry/issue-12562/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import log from "./log";
log("Hi");
17 changes: 17 additions & 0 deletions test/configCases/entry/issue-12562/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/** @type {import("../../../../").Configuration} */
module.exports = {
entry: {
app: "./app.js",
home: {
import: "./home.js",
dependOn: "app"
}
},
output: {
pathinfo: "verbose",
filename: "[name].js"
},
optimization: {
runtimeChunk: "single"
}
};

0 comments on commit 5c67208

Please sign in to comment.