diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2017-06-07 22:45:57 +0300 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-06-07 22:45:57 +0300 |
commit | 3ec37e2622f6729300a988c8f58dfb6c2aecb996 (patch) | |
tree | d060b5acf30093cbe1d3642ea6dd11e79ccbf6c5 /config/webpack.config.js | |
parent | a65f07a256b95ce1c38342518f9469cbf3abf609 (diff) | |
parent | fc1090d9f39231e31f929e37b9703db9738b457c (diff) |
Merge branch 'master' into 25426-group-dashboard-ui
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r-- | config/webpack.config.js | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js index d67076ce06b..357193abbff 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. @@ -42,6 +43,7 @@ var config = { groups: './groups/index.js', groups_list: './groups_list.js', issue_show: './issue_show/index.js', + integrations: './integrations', locale: './locale/index.js', main: './main.js', merge_conflicts: './merge_conflicts/merge_conflicts_bundle.js', @@ -75,8 +77,6 @@ var config = { chunkFilename: IS_PRODUCTION ? '[name].[chunkhash].chunk.js' : '[name].chunk.js', }, - devtool: 'cheap-module-source-map', - module: { rules: [ { @@ -224,11 +224,18 @@ if (IS_PRODUCTION) { }), new webpack.DefinePlugin({ 'process.env': { NODE_ENV: JSON.stringify('production') } - }), - new CompressionPlugin({ - asset: '[path].gz[query]', }) ); + + // zopfli requires a lot of compute time and is disabled in CI + if (!NO_COMPRESSION) { + config.plugins.push( + new CompressionPlugin({ + asset: '[path].gz[query]', + algorithm: 'zopfli', + }) + ); + } } if (IS_DEV_SERVER) { |