2014-02-05 19:05:09 +08:00
|
|
|
var path = require("path");
|
|
|
|
var AggressiveMergingPlugin = require("../../lib/optimize/AggressiveMergingPlugin");
|
|
|
|
module.exports = {
|
2017-12-14 17:09:09 +08:00
|
|
|
// mode: "development" || "production",
|
2014-02-05 19:05:09 +08:00
|
|
|
entry: {
|
|
|
|
pageA: "./pageA",
|
|
|
|
pageB: "./pageB",
|
|
|
|
pageC: "./pageC"
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: path.join(__dirname, "js"),
|
|
|
|
filename: "[name].bundle.js",
|
|
|
|
chunkFilename: "[id].chunk.js"
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new AggressiveMergingPlugin({
|
|
|
|
minSizeReduce: 1.5,
|
|
|
|
moveToParents: true
|
|
|
|
})
|
2017-12-14 17:09:09 +08:00
|
|
|
],
|
|
|
|
optimization: {
|
|
|
|
occurrenceOrder: true // To keep filename consistent between different modes (for example building only)
|
|
|
|
}
|
2017-01-11 17:51:58 +08:00
|
|
|
};
|