-
Moritz Langenstein authoredMoritz Langenstein authored
webpack.bench.js 451 B
const merge = require("webpack-merge")
const common = require("./webpack.common.js")
const BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
.BundleAnalyzerPlugin
module.exports = (env) => {
const config = merge(common, {
mode: "production",
entry: {
benchmarks: "./__benchmarks__/benchmarks.js",
},
plugins: env && env.analyze ? [new BundleAnalyzerPlugin()] : [],
})
delete config.entry.app
return config
}