Skip to content

Commit

Permalink
test(split_chunks): migrate split-chunks-common/simple
Browse files Browse the repository at this point in the history
  • Loading branch information
hyf0 committed May 5, 2023
1 parent 1907257 commit d310dea
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = "a";
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
it("should run", function () {
var a = require("./a");
expect(a).toBe("a");
});

it("should be main", function () {
expect(require.main).toBe(module);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
findBundle: function (i, options) {
return ["./vendor.js", "./main.js"];
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/** @type {import("../../../../").Configuration} */
module.exports = {
entry: {
vendor: ["./a"],
main: "./index"
},
target: "web",
output: {
filename: "[name].js"
},
experiments: {
newSplitChunks: true
},
optimization: {
splitChunks: {
minSize: 1,
name: "vendor"
}
}
};

0 comments on commit d310dea

Please sign in to comment.