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

26 lines
617 B
JavaScript

"use strict";
const path = require("path");
const webpack = require("../../");
module.exports = {
// mode: "development" || "production",
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")
};