Skip to content

Commit 8bab88c

Browse files
authored
Merge pull request webpack#4814 from webpack/test/move-entry
add testcase for moving entry modules into the commons chunk
2 parents 85dc98f + a244879 commit 8bab88c

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = "a";
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
require("should");
2+
3+
it("should not be moved", function() {
4+
new Error().stack.should.not.match(/webpackBootstrap/);
5+
});
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
findBundle: function(i, options) {
3+
return [
4+
"./commons.js",
5+
"./main.js"
6+
]
7+
}
8+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
var CommonsChunkPlugin = require("../../../../lib/optimize/CommonsChunkPlugin");
2+
module.exports = {
3+
entry: {
4+
main: "./index",
5+
second: "./index"
6+
},
7+
target: "web",
8+
output: {
9+
filename: "[name].js"
10+
},
11+
plugins: [
12+
new CommonsChunkPlugin({
13+
name: "commons"
14+
})
15+
]
16+
};

0 commit comments

Comments
 (0)