mirror of https://github.com/curbengh/hexo-yam
				
				
				
			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:
		
							parent
							
								
									49c9fcb310
								
							
						
					
					
						commit
						4f5104c408
					
				|  | @ -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) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue