Skip to content

Commit

Permalink
refactor: use new method of accessing zlib constants
Browse files Browse the repository at this point in the history
"Accessing the constants directly from the module is currently still possible but is deprecated."
https://nodejs.org/api/zlib.html#zlib_zlib_constants
  • Loading branch information
weyusi committed Apr 22, 2019
1 parent 9b52aed commit 369bad9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function logicGzip () {
assetPath.on('end', () => {
if (assetTxt.length) {
// gzip compress using highest level
zlib.gzip(assetTxt, { level: zlib.Z_BEST_COMPRESSION }, (err, Input) => {
zlib.gzip(assetTxt, { level: zlib.constants.Z_BEST_COMPRESSION }, (err, Input) => {
if (!err) {
// Save the compressed file to .gz
route.set(path + '.gz', Input)
Expand Down

0 comments on commit 369bad9

Please sign in to comment.