mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 17:21:18 +01:00
Added webpack-bundle-analyzer
This commit is contained in:
parent
f452ea0d26
commit
392d1fe26d
2 changed files with 11 additions and 1 deletions
|
@ -5,6 +5,7 @@ var loaders = require('./webpack.loaders');
|
||||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||||
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
var WebpackCleanupPlugin = require('webpack-cleanup-plugin');
|
var WebpackCleanupPlugin = require('webpack-cleanup-plugin');
|
||||||
|
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||||
|
|
||||||
var OUTPATH;
|
var OUTPATH;
|
||||||
if(process.env.CIRCLE_ARTIFACTS) {
|
if(process.env.CIRCLE_ARTIFACTS) {
|
||||||
|
@ -79,6 +80,14 @@ module.exports = {
|
||||||
template: './src/template.html',
|
template: './src/template.html',
|
||||||
title: 'Maputnik'
|
title: 'Maputnik'
|
||||||
}),
|
}),
|
||||||
new webpack.optimize.DedupePlugin()
|
new webpack.optimize.DedupePlugin(),
|
||||||
|
new BundleAnalyzerPlugin({
|
||||||
|
analyzerMode: 'static',
|
||||||
|
defaultSizes: 'gzip',
|
||||||
|
openAnalyzer: false,
|
||||||
|
generateStatsFile: true,
|
||||||
|
reportFilename: 'bundle-stats.html',
|
||||||
|
statsFilename: 'bundle-stats.json',
|
||||||
|
}),
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
|
@ -125,6 +125,7 @@
|
||||||
"wdio-spec-reporter": "^0.1.2",
|
"wdio-spec-reporter": "^0.1.2",
|
||||||
"webdriverio": "^4.8.0",
|
"webdriverio": "^4.8.0",
|
||||||
"webpack": "^3.8.1",
|
"webpack": "^3.8.1",
|
||||||
|
"webpack-bundle-analyzer": "^2.9.0",
|
||||||
"webpack-cleanup-plugin": "^0.5.1",
|
"webpack-cleanup-plugin": "^0.5.1",
|
||||||
"webpack-dev-server": "^2.9.4"
|
"webpack-dev-server": "^2.9.4"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue