From 837802acdaa05d5ba67872befdbf24f3468b5e80 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Tue, 16 Feb 2021 11:14:04 -0800 Subject: [PATCH] Add compress to common --- packages/webapp/webpack.common.js | 3 +-- packages/webapp/webpack.prod.js | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/packages/webapp/webpack.common.js b/packages/webapp/webpack.common.js index 372202eb..f5f773d6 100644 --- a/packages/webapp/webpack.common.js +++ b/packages/webapp/webpack.common.js @@ -63,7 +63,6 @@ module.exports = { ] } }] - }), - new CompressionPlugin() + }) ] } \ No newline at end of file diff --git a/packages/webapp/webpack.prod.js b/packages/webapp/webpack.prod.js index 1a8605cc..94121e26 100644 --- a/packages/webapp/webpack.prod.js +++ b/packages/webapp/webpack.prod.js @@ -6,5 +6,21 @@ module.exports = merge(common, { mode: 'production', devtool: 'source-map', optimization: { - minimize: true } + minimize: true + }, + plugins: [ + new CleanWebpackPlugin(), + new CopyWebpackPlugin({ + patterns: [{ + from: 'public/*', + to: '[name].[ext]', + globOptions: { + ignore: [ + '**/index.html' + ] + } + }] + }), + new CompressionPlugin() + ] });