mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-19 16:22:48 +01:00
Only compress assets with a certain minimum size. Otherwise its quite inefficientg
This commit is contained in:
@@ -169,22 +169,25 @@ for (const theme of AVAILABLE_THEMES) {
|
||||
|
||||
|
||||
if (Encore.isProduction()) {
|
||||
Encore.addPlugin(new CompressionPlugin({
|
||||
filename: '[path][base].br',
|
||||
algorithm: 'brotliCompress',
|
||||
test: /\.(js|css|html|svg)$/,
|
||||
compressionOptions: {
|
||||
// zlib’s `level` option matches Brotli’s `BROTLI_PARAM_QUALITY` option.
|
||||
level: 11,
|
||||
},
|
||||
//threshold: 10240,
|
||||
minRatio: 0.8,
|
||||
deleteOriginalAssets: false,
|
||||
}))
|
||||
Encore
|
||||
.addPlugin(new CompressionPlugin({
|
||||
filename: '[path][base].br',
|
||||
algorithm: 'brotliCompress',
|
||||
test: /\.(js|css|html|svg)$/,
|
||||
compressionOptions: {
|
||||
// zlib’s `level` option matches Brotli’s `BROTLI_PARAM_QUALITY` option.
|
||||
level: 11,
|
||||
},
|
||||
threshold: 10240,
|
||||
minRatio: 0.8,
|
||||
deleteOriginalAssets: false,
|
||||
}))
|
||||
|
||||
.addPlugin(new CompressionPlugin({
|
||||
filename: '[path][base].gz',
|
||||
algorithm: 'gzip',
|
||||
threshold: 10240,
|
||||
minRatio: 0.8,
|
||||
test: /\.(js|css|html|svg)$/,
|
||||
deleteOriginalAssets: false,
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user