about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorYurii Izorkin <izorkin@elven.pw>2022-12-15 19:07:36 +0300
committerGitHub <noreply@github.com>2022-12-15 17:07:36 +0100
commit7972e5981c312eb11e5f7f5676e7d565881ccdaa (patch)
tree5255d8eab7e83d6ec378b20bbd7acfa44c6b7281 /config
parent1e95fa3df5ad65051bf598da91d589f69b652959 (diff)
Add brotli compression (#19025)
Diffstat (limited to 'config')
-rw-r--r--config/webpack/production.js6
1 files changed, 6 insertions, 0 deletions
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,