From 7972e5981c312eb11e5f7f5676e7d565881ccdaa Mon Sep 17 00:00:00 2001 From: Yurii Izorkin Date: Thu, 15 Dec 2022 19:07:36 +0300 Subject: [PATCH] Add brotli compression (#19025) --- config/webpack/production.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/webpack/production.js b/config/webpack/production.js index 79dcebc7c..143a23b99 100644 --- a/config/webpack/production.js +++ b/config/webpack/production.js @@ -34,6 +34,12 @@ module.exports = merge(sharedConfig, { cache: true, test: /\.(js|css|html|json|ico|svg|eot|otf|ttf|map)$/, }), + new CompressionPlugin({ + filename: '[path][base].br[query]', + algorithm: 'brotliCompress', + cache: true, + test: /\.(js|css|html|json|ico|svg|eot|otf|ttf|map)$/, + }), new BundleAnalyzerPlugin({ // generates report.html analyzerMode: 'static', openAnalyzer: false,