Skip to content

Commit e5cc5b5

Browse files
author
Fabian Gander
committed
Adding BundleAnalyzer to show how the webpack bundled content looks like.
1 parent 0b5e263 commit e5cc5b5

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"styled-components": "^2.4.1",
7474
"uglifyjs-webpack-plugin": "^0.4.6",
7575
"webpack": "^3.2.0",
76+
"webpack-bundle-analyzer": "^2.13.1",
7677
"webpack-dev-server": "^2.5.1"
7778
},
7879
"dependencies": {

webpack.config.prod.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const path = require('path');
22
const CleanWebpackPlugin = require('clean-webpack-plugin');
33
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
4+
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
45

56
module.exports = {
67
entry: path.resolve(__dirname, 'lib/index'),
@@ -20,6 +21,7 @@ module.exports = {
2021
new UglifyJsPlugin({
2122
comments: false,
2223
}),
24+
new BundleAnalyzerPlugin(),
2325
],
2426
module: {
2527
rules: [

0 commit comments

Comments
 (0)