Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
brotli-webpack-plugin
Advanced tools
Changelog
1.1.0
Added native brotli support via zlib.brotliCompressSync for Node v11.7+.
Readme
This plugin compresses assets with Brotli compression algorithm using zlib, iltorb or brotli.js libraries for serving it with ngx_brotli or such.
npm install --save-dev brotli-webpack-plugin
var BrotliPlugin = require('brotli-webpack-plugin');
module.exports = {
plugins: [
new BrotliPlugin({
asset: '[path].br[query]',
test: /\.(js|css|html|svg)$/,
threshold: 10240,
minRatio: 0.8
})
]
}
Arguments:
asset
: The target asset name. Defaults to '[path].br[query]'
.
[file]
is replaced with the original asset file name.[fileWithoutExt]
is replaced with the file name minus its extension, e.g. the style
of style.css
.[ext]
is replaced with the file name extension, e.g. the css
of style.css
.[path]
is replaced with the path of the original asset.[query]
is replaced with the query.test
: All assets matching this RegExp are processed. Defaults to every asset.threshold
: Only assets bigger than this size (in bytes) are processed. Defaults to 0
.minRatio
: Only assets that compress better that this ratio are processed. Defaults to 0.8
.deleteOriginalAssets
: remove original files that were compressed with brotli. Default: falseOptional arguments for Brotli (see iltorb doc for details):
mode
: Default: 0,quality
: Default: 11,lgwin
: Default: 22,lgblock
: Default: 0,size_hint
: Default: 0,disable_literal_context_modeling
: Default: falseHeavily copy-pasted from webpack/compression-webpack-plugin by Tobias Koppers.
Licensed under MIT.
FAQs
Prepare Brotli-compressed versions of assets to serve them with Content-Encoding: br
The npm package brotli-webpack-plugin receives a total of 65,887 weekly downloads. As such, brotli-webpack-plugin popularity was classified as popular.
We found that brotli-webpack-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.