Merge pull request #195 from orangemug/feature/webpack-bundle-analyzer

Webpack bundle analyzer
This commit is contained in:
Orange Mug 2017-11-28 08:58:23 +00:00 committed by GitHub
commit 949bd783f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 50 additions and 0 deletions

View file

@ -5,6 +5,7 @@ var loaders = require('./webpack.loaders');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var WebpackCleanupPlugin = require('webpack-cleanup-plugin');
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
var OUTPATH;
if(process.env.CIRCLE_ARTIFACTS) {
@ -78,6 +79,14 @@ module.exports = {
new HtmlWebpackPlugin({
template: './src/template.html',
title: 'Maputnik'
}),
new BundleAnalyzerPlugin({
analyzerMode: 'static',
defaultSizes: 'gzip',
openAnalyzer: false,
generateStatsFile: true,
reportFilename: 'bundle-stats.html',
statsFilename: 'bundle-stats.json',
})
]
};

40
package-lock.json generated
View file

@ -4431,6 +4431,12 @@
"resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
"integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY="
},
"filesize": {
"version": "3.5.11",
"resolved": "https://registry.npmjs.org/filesize/-/filesize-3.5.11.tgz",
"integrity": "sha512-ZH7loueKBoDb7yG9esn1U+fgq7BzlzW6NRi5/rMdxIZ05dj7GFD/Xc5rq2CDt5Yq86CyfSYVyx4242QQNZbx1g==",
"dev": true
},
"fill-range": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz",
@ -4878,6 +4884,15 @@
"integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==",
"dev": true
},
"gzip-size": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-3.0.0.tgz",
"integrity": "sha1-VGGI6b3DN/Zzdy+BZgRks4nc5SA=",
"dev": true,
"requires": {
"duplexer": "0.1.1"
}
},
"handle-thing": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz",
@ -7869,6 +7884,12 @@
"mimic-fn": "1.1.0"
}
},
"opener": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/opener/-/opener-1.4.3.tgz",
"integrity": "sha1-XG2ixdflgx6P+jlklQ+NZnSskLg=",
"dev": true
},
"openlayers": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/openlayers/-/openlayers-4.4.2.tgz",
@ -12739,6 +12760,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.1"
}
},
"webpack-cleanup-plugin": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/webpack-cleanup-plugin/-/webpack-cleanup-plugin-0.5.1.tgz",

View file

@ -125,6 +125,7 @@
"wdio-spec-reporter": "^0.1.2",
"webdriverio": "^4.8.0",
"webpack": "^3.8.1",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-cleanup-plugin": "^0.5.1",
"webpack-dev-server": "^2.9.4"
}