about summary refs log tree commit diff
path: root/config/webpack/production.js
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-06-18 09:57:09 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-06-18 02:57:09 +0200
commit53e42bf91ef2c705168f8d04b9374c349ec14074 (patch)
tree564d8607ee6fd7ac27979d157b261c038e9fad61 /config/webpack/production.js
parent94d0e012dea89058b9c059636fb6d42f6565e534 (diff)
Upgrade Webpacker to version 2.0 (#3729)
Diffstat (limited to 'config/webpack/production.js')
-rw-r--r--config/webpack/production.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/config/webpack/production.js b/config/webpack/production.js
index 755464061..303fca81b 100644
--- a/config/webpack/production.js
+++ b/config/webpack/production.js
@@ -7,26 +7,27 @@ const sharedConfig = require('./shared.js');
 const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
 
 module.exports = merge(sharedConfig, {
-
-  devtool: 'source-map', // separate sourcemap file, suitable for production
-
   output: { filename: '[name]-[chunkhash].js' },
+  devtool: 'source-map', // separate sourcemap file, suitable for production
+  stats: 'normal',
 
   plugins: [
     new webpack.optimize.UglifyJsPlugin({
-      compress: true,
+      sourceMap: true,
       mangle: true,
 
+      compress: {
+        warnings: false,
+      },
+
       output: {
         comments: false,
       },
-
-      sourceMap: true,
     }),
     new CompressionPlugin({
       asset: '[path].gz[query]',
       algorithm: 'gzip',
-      test: /\.(js|css|svg|eot|ttf|woff|woff2)$/,
+      test: /\.(js|css|html|json|ico|svg|eot|otf|ttf)$/,
     }),
     new BundleAnalyzerPlugin({ // generates report.html and stats.json
       analyzerMode: 'static',