summaryrefslogtreecommitdiff
path: root/config/webpack.config.js
diff options
context:
space:
mode:
authorJacob Schatz <jschatz@gitlab.com>2017-08-07 19:30:14 +0000
committerJacob Schatz <jschatz@gitlab.com>2017-08-07 19:30:14 +0000
commit60bc0fc16900316ff22b83c6de3b358767d838b9 (patch)
treec22b8611043b88c01e73e17bef8b4ecc1d1af904 /config/webpack.config.js
parentdd3d422193c5f8d11ca15d3dac2ac33e55736789 (diff)
parent669ff236dc5b4bfa5916c9406231f3e8cfc2f8c2 (diff)
downloadgitlab-ce-60bc0fc16900316ff22b83c6de3b358767d838b9.tar.gz
Merge branch '33902-upgrade-to-webpack-v3' into 'master'
Upgrade to webpack v3.4.0 Closes #33902 See merge request !12298
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r--config/webpack.config.js21
1 files changed, 14 insertions, 7 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 32e57c43bd9..d856806e5bd 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;
@@ -128,12 +128,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
@@ -252,6 +258,7 @@ if (IS_DEV_SERVER) {
config.devServer = {
host: DEV_SERVER_HOST,
port: DEV_SERVER_PORT,
+ disableHostCheck: true,
headers: { 'Access-Control-Allow-Origin': '*' },
stats: 'errors-only',
hot: DEV_SERVER_LIVERELOAD,