Add webpack script/config to analyze bundle size.

Execute `npm run analyze` to open a size map of the production build in the browser.
This commit is contained in:
Borewit 2018-06-25 18:47:15 +02:00 committed by Jordan Eldredge
parent b9b344b8bb
commit aae9865786
3 changed files with 60 additions and 2 deletions

View file

@ -0,0 +1,11 @@
const BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
.BundleAnalyzerPlugin;
const merge = require("webpack-merge");
const prod = require("./webpack.prod.js");
const config = merge(prod, {
plugins: [new BundleAnalyzerPlugin()]
});
module.exports = config;