aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorFred Carlsen <fred@sjelfull.no>2018-12-11 00:47:54 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-11 00:51:52 +0800
commit4138c580bc70421d51e62ecbb74af3725a1c495c (patch)
tree185daf630c6db2be38c31bd9ae78020178bb1ef7 /packages
parenta3f12cd4de626ae23040141d8347e94c728790ad (diff)
downloaddexon-sol-tools-4138c580bc70421d51e62ecbb74af3725a1c495c.tar
dexon-sol-tools-4138c580bc70421d51e62ecbb74af3725a1c495c.tar.gz
dexon-sol-tools-4138c580bc70421d51e62ecbb74af3725a1c495c.tar.bz2
dexon-sol-tools-4138c580bc70421d51e62ecbb74af3725a1c495c.tar.lz
dexon-sol-tools-4138c580bc70421d51e62ecbb74af3725a1c495c.tar.xz
dexon-sol-tools-4138c580bc70421d51e62ecbb74af3725a1c495c.tar.zst
dexon-sol-tools-4138c580bc70421d51e62ecbb74af3725a1c495c.zip
Add bundle analyzer
Diffstat (limited to 'packages')
-rw-r--r--packages/website/package.json1
-rw-r--r--packages/website/webpack.config.js4
2 files changed, 5 insertions, 0 deletions
diff --git a/packages/website/package.json b/packages/website/package.json
index e6dc603fa..0f70a4543 100644
--- a/packages/website/package.json
+++ b/packages/website/package.json
@@ -114,6 +114,7 @@
"typescript": "3.0.1",
"uglifyjs-webpack-plugin": "^2.0.1",
"webpack": "^4.20.2",
+ "webpack-bundle-analyzer": "^3.0.3",
"webpack-cli": "3.1.2",
"webpack-dev-server": "^3.1.9"
}
diff --git a/packages/website/webpack.config.js b/packages/website/webpack.config.js
index 32e16eeef..aaaa31082 100644
--- a/packages/website/webpack.config.js
+++ b/packages/website/webpack.config.js
@@ -3,6 +3,7 @@ const webpack = require('webpack');
const TerserPlugin = require('terser-webpack-plugin');
const RollbarSourceMapPlugin = require('rollbar-sourcemap-webpack-plugin');
const childProcess = require('child_process');
+const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const GIT_SHA = childProcess
.execSync('git rev-parse HEAD')
@@ -115,6 +116,9 @@ module.exports = (_env, argv) => {
let plugins = [];
if (argv.mode === 'development') {
config.mode = 'development';
+ plugins.concat([
+ new BundleAnalyzerPlugin(),
+ ]);
} else {
config.mode = 'production';
plugins = plugins.concat([