webpack/examples/http2-aggressive-splitting/webpack.config.js

26 lines
617 B
JavaScript
Raw Normal View History

"use strict";
2024-07-31 09:56:53 +08:00
const path = require("path");
const webpack = require("../../");
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
entry: "./example",
output: {
path: path.join(__dirname, "dist"),
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")
})
],
recordsOutputPath: path.join(__dirname, "dist", "records.json")
};