From 9c6109db341312222e9dd7158c4e5f41809c4aa3 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Tue, 30 May 2017 11:41:50 -0500 Subject: skip asset compression in CI --- config/webpack.config.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/webpack.config.js b/config/webpack.config.js index c77b1d6334c..b7b80f4bf47 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -16,6 +16,7 @@ var DEV_SERVER_HOST = process.env.DEV_SERVER_HOST || 'localhost'; var DEV_SERVER_PORT = parseInt(process.env.DEV_SERVER_PORT, 10) || 3808; var DEV_SERVER_LIVERELOAD = process.env.DEV_SERVER_LIVERELOAD !== 'false'; var WEBPACK_REPORT = process.env.WEBPACK_REPORT; +var NO_COMPRESSION = process.env.NO_COMPRESSION; var config = { // because sqljs requires fs. @@ -222,11 +223,16 @@ if (IS_PRODUCTION) { }), new webpack.DefinePlugin({ 'process.env': { NODE_ENV: JSON.stringify('production') } - }), - new CompressionPlugin({ - asset: '[path].gz[query]', }) ); + + if (!NO_COMPRESSION) { + config.plugins.push( + new CompressionPlugin({ + asset: '[path].gz[query]', + }) + ); + } } if (IS_DEV_SERVER) { -- cgit v1.2.1