Skip to content

Commit

Permalink
feat: update compression webpack plugin to 7.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AnWeber committed Mar 22, 2021
1 parent d20438c commit c0d49d6
Show file tree
Hide file tree
Showing 5 changed files with 1,218 additions and 16,594 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js Package

on:
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ module.exports = {
algorithm: 'brotliCompress',
include: /\.(js|css|html|svg|json)(\?.*)?$/i,
compressionOptions: {
level: 11,
params: {
[zlib.constants.BROTLI_PARAM_QUALITY]: 11,
},
},
minRatio: 0.8,
},
Expand Down
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const CompressionPlugin = require('compression-webpack-plugin');
const zlib = require("zlib");


module.exports = (api, options) => {
Expand All @@ -10,7 +11,9 @@ module.exports = (api, options) => {
algorithm: 'brotliCompress',
include: /\.(js|css|html|svg|json)(\?.*)?$/i,
compressionOptions: {
level: 11,
params: {
[zlib.constants.BROTLI_PARAM_QUALITY]: 11,
},
},
minRatio: 0.8,
},
Expand Down
Loading

0 comments on commit c0d49d6

Please sign in to comment.