diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-08-06 23:14:42 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-08-07 11:08:58 -0500 |
commit | e43099e407b9794728e967b1f757686fd8941179 (patch) | |
tree | 9cf12e69d69d4f181b95d83ff208e8fcafa66cd7 /config | |
parent | 1e207e8a1ad3c7885192b17a44dab2c350c5fa5a (diff) | |
download | gitlab-ce-e43099e407b9794728e967b1f757686fd8941179.tar.gz |
replace stats-webpack-plugin with webpack-stats-plugin
Diffstat (limited to 'config')
-rw-r--r-- | config/webpack.config.js | 20 |
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 |