Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-08-07 07:14:42 +0300
committerMike Greiling <mike@pixelcog.com>2017-08-07 19:08:58 +0300
commite43099e407b9794728e967b1f757686fd8941179 (patch)
tree9cf12e69d69d4f181b95d83ff208e8fcafa66cd7 /config/webpack.config.js
parent1e207e8a1ad3c7885192b17a44dab2c350c5fa5a (diff)
replace stats-webpack-plugin with webpack-stats-plugin
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r--config/webpack.config.js20
1 files changed, 13 insertions, 7 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 1205b90de40..100fdc31cbb 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -3,7 +3,7 @@
var fs = require('fs');
var path = require('path');
var webpack = require('webpack');
-var StatsPlugin = require('stats-webpack-plugin');
+var StatsWriterPlugin = require('webpack-stats-plugin').StatsWriterPlugin;
var CompressionPlugin = require('compression-webpack-plugin');
var NameAllModulesPlugin = require('name-all-modules-plugin');
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
@@ -127,12 +127,18 @@ var config = {
plugins: [
// manifest filename must match config.webpack.manifest_filename
// webpack-rails only needs assetsByChunkName to function properly
- new StatsPlugin('manifest.json', {
- chunkModules: false,
- source: false,
- chunks: false,
- modules: false,
- assets: true
+ new StatsWriterPlugin({
+ filename: 'manifest.json',
+ transform: function(data, opts) {
+ var stats = opts.compiler.getStats().toJson({
+ chunkModules: false,
+ source: false,
+ chunks: false,
+ modules: false,
+ assets: true
+ });
+ return JSON.stringify(stats, null, 2);
+ }
}),
// prevent pikaday from including moment.js