add bundle analyser

This commit is contained in:
casperlamboo 2017-12-05 16:28:19 +01:00
parent 9f03f6af61
commit 5647c75d67
3 changed files with 22 additions and 1 deletions

19
package-lock.json generated
View File

@ -9489,6 +9489,25 @@
}
}
},
"webpack-bundle-analyzer": {
"version": "2.9.1",
"resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.9.1.tgz",
"integrity": "sha512-a+UcvlsXvCmclNgfThT8PVyuJKd029By7CxkYEbNNCfs0Lqj9gagjkdv3S3MBvCIKBaUGYs8l4UpiVI0bFoh2Q==",
"dev": true,
"requires": {
"acorn": "5.2.1",
"chalk": "1.1.3",
"commander": "2.11.0",
"ejs": "2.5.7",
"express": "4.16.2",
"filesize": "3.5.11",
"gzip-size": "3.0.0",
"lodash": "4.17.4",
"mkdirp": "0.5.1",
"opener": "1.4.3",
"ws": "3.3.2"
}
},
"webpack-dev-middleware": {
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-1.12.0.tgz",

View File

@ -47,6 +47,7 @@
"valid-url": "^1.0.9"
},
"devDependencies": {
"webpack-bundle-analyzer": "^2.9.1",
"babel-cli": "6.24.1",
"babel-core": "6.24.1",
"babel-loader": "^7.0.0",

View File

@ -1,5 +1,5 @@
const path = require('path');
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const HTMLWebpackPlugin = require('html-webpack-plugin');
const devMode = process.env.NODE_ENV !== 'production';
@ -80,6 +80,7 @@ module.exports = {
inject: false,
appMountId: 'app'
}),
// new BundleAnalyzerPlugin()
],
devtool: "source-map",
devServer: {