2025-07-02 20:10:54 +08:00
|
|
|
"use strict";
|
|
|
|
|
2024-07-31 09:56:53 +08:00
|
|
|
const path = require("path");
|
|
|
|
const { AggressiveMergingPlugin } = require("../..").optimize;
|
2019-10-09 23:11:34 +08:00
|
|
|
|
2014-02-05 19:05:09 +08:00
|
|
|
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: {
|
2018-01-05 04:39:29 +08:00
|
|
|
path: path.join(__dirname, "dist"),
|
2014-02-05 19:05:09 +08:00
|
|
|
filename: "[name].bundle.js",
|
|
|
|
chunkFilename: "[id].chunk.js"
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new AggressiveMergingPlugin({
|
2018-01-20 00:06:59 +08:00
|
|
|
minSizeReduce: 1.5
|
2014-02-05 19:05:09 +08:00
|
|
|
})
|
2017-12-14 17:09:09 +08:00
|
|
|
],
|
|
|
|
optimization: {
|
2018-12-19 21:05:17 +08:00
|
|
|
chunkIds: "deterministic" // To keep filename consistent between different modes (for example building only)
|
2017-12-14 17:09:09 +08:00
|
|
|
}
|
2017-01-11 17:51:58 +08:00
|
|
|
};
|