fix: use the default options for brotli

brotli already defaults to max (11) compression level
BROTLI_MAX_QUALITY is unnecessary and somehow corresponds to lower level
This commit is contained in:
weyusi 2019-04-22 18:28:00 +09:30
parent 49c9fcb310
commit 4f5104c408
1 changed files with 2 additions and 2 deletions

View File

@ -159,8 +159,8 @@ function logicBrotli () {
if (assetTxt.length) { if (assetTxt.length) {
// Input has to be buffer for brotli // Input has to be buffer for brotli
let input = new Buffer.from(assetTxt, 'utf-8') let input = new Buffer.from(assetTxt, 'utf-8')
// brotli compress using highest level // brotli defaults to max compression level
br.compress(input, { quality: br.BROTLI_MAX_QUALITY }, (err, output) => { br.compress(input, (err, output) => {
if (!err) { if (!err) {
// Save the compressed file to .br // Save the compressed file to .br
route.set(path + '.br', output) route.set(path + '.br', output)