2025-07-02 20:10:54 +08:00
|
|
|
"use strict";
|
|
|
|
|
2024-07-31 09:56:53 +08:00
|
|
|
const path = require("path");
|
|
|
|
const webpack = require("../../");
|
|
|
|
|
2016-07-13 17:03:14 +08:00
|
|
|
module.exports = {
|
2023-03-12 10:27:40 +08:00
|
|
|
// mode: "development" || "production",
|
2017-11-21 18:04:18 +08:00
|
|
|
cache: true, // better performance for the AggressiveSplittingPlugin
|
2016-07-13 17:03:14 +08:00
|
|
|
entry: "./example",
|
|
|
|
output: {
|
2018-01-05 04:39:29 +08:00
|
|
|
path: path.join(__dirname, "dist"),
|
2016-07-13 17:03:14 +08:00
|
|
|
filename: "[chunkhash].js",
|
|
|
|
chunkFilename: "[chunkhash].js"
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new webpack.optimize.AggressiveSplittingPlugin({
|
|
|
|
minSize: 30000,
|
|
|
|
maxSize: 50000
|
|
|
|
}),
|
|
|
|
new webpack.DefinePlugin({
|
|
|
|
"process.env.NODE_ENV": JSON.stringify("production")
|
|
|
|
})
|
|
|
|
],
|
2018-01-05 04:39:29 +08:00
|
|
|
recordsOutputPath: path.join(__dirname, "dist", "records.json")
|
2016-07-13 17:03:14 +08:00
|
|
|
};
|