@siteone/builder-plugin-brotli

plugin for preparing compressed assets with brotli

Usage no npm install needed!

<script type="module">
  import siteoneBuilderPluginBrotli from 'https://cdn.skypack.dev/@siteone/builder-plugin-brotli';
</script>

README

@siteone/builder-plugin-brotli

plugin for preparing compressed assets with brotli

Install

$ npm install --save-dev @siteone/builder-plugin-brotli

Usage

None – recognized by and attached to @siteone/builder-core automatically!

Config

Configurable via the brotli key on your bldr.config.js file.

Default Config:

exports.brotli = {
  cache: true,
  threshold: 0,
  minRatio: 0.8,
  compressionOptions: {
    quality: 11,
    size_hint: 0,
    lgblock: 0,
    lgwin: 22,
    mode: 0
  }
}

Available Options:

See Options for compression-webpack-plugin.

Also see iltorb's Encoding Params for the compressionOptions object.

:bulb: Explanations for the brotli parameters are available here.