From 4acf0ad58d0c22144e19bb5c927411beb4ba9623 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Fri, 17 Aug 2018 12:33:15 -0500 Subject: [PATCH] webpack compression plugin (activated in production config) --- webpack.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index e3fa49050..1386eb2c5 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -18,6 +18,7 @@ // there's a bug in pkg clone-deep re: regex; for now use lodash.clonedeep // see: https://github.com/jonschlinkert/clone-deep/pull/14 const cloneDeep = require('lodash.clonedeep'); +const CompressionPlugin = require('compression-webpack-plugin'); const fs = require('fs'); const glob = require('glob'); const HardSourceWebpackPlugin = require('hard-source-webpack-plugin'); @@ -156,6 +157,7 @@ devBabelLoader.options.compact = false; const production = cloneDeep(base); production.mode = 'production'; production.name = 'production'; +production.plugins.push(new CompressionPlugin()); // export a list of named configs // -----------------------------------------------------------------------------