Add brotli compression (#19025)

This commit is contained in:
Yurii Izorkin 2022-12-15 19:07:36 +03:00 committed by GitHub
parent 1e95fa3df5
commit 7972e5981c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -34,6 +34,12 @@ module.exports = merge(sharedConfig, {
cache: true, cache: true,
test: /\.(js|css|html|json|ico|svg|eot|otf|ttf|map)$/, 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 new BundleAnalyzerPlugin({ // generates report.html
analyzerMode: 'static', analyzerMode: 'static',
openAnalyzer: false, openAnalyzer: false,