mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-10-28 20:23:47 +08:00
improve (speed): support for brotli compression
This commit is contained in:
@ -82,6 +82,13 @@ if (process.env.NODE_ENV === 'production') {
|
||||
threshold: 0,
|
||||
minRatio: 0.8
|
||||
}));
|
||||
config.plugins.push(new CompressionPlugin({
|
||||
asset: "[path].br[query]",
|
||||
algorithm: "brotliCompress",
|
||||
test: /\.js$|\.json$|\.html$|\.svg|\.ico$/,
|
||||
threshold: 0,
|
||||
minRatio: 0.8
|
||||
}));
|
||||
} else {
|
||||
config.devtool = '#inline-source-map';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user