# @tadashi/rollup-plugin-brotli

> Compress your Rollup bundle with Brotli

Latest version **1.0.2** (published 2020-04-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tadashi/rollup-plugin-brotli
pnpm add @tadashi/rollup-plugin-brotli
yarn add @tadashi/rollup-plugin-brotli
bun add @tadashi/rollup-plugin-brotli
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-04-07 |
| First published | 2020-04-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.19.0 |
| Dependencies | 0 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Michael Strobel |
| Maintainers | lagden |
| Keywords | rollup, plugin, brotli, compress |

## Links

- npm: https://www.npmjs.com/package/@tadashi/rollup-plugin-brotli
- Repository: https://github.com/lagden/rollup-plugin-brotli
- Homepage: https://github.com/lagden/rollup-plugin-brotli#readme
- Issues: https://github.com/lagden/rollup-plugin-brotli/issues
- npm.io page: https://npm.io/package/@tadashi/rollup-plugin-brotli

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2020-04-07
- 1.0.1 — 2020-04-07
- 1.0.0 — 2020-04-07

## README

# rollup-plugin-brotli

Creates a compressed `.br` artifact for your Rollup bundle.


## Installation

```
npm i -D @tadashi/rollup-plugin-brotli
```


## Usage

```js
import {rollup} from 'rollup'
import brotli from 'rollup-plugin-brotli'

rollup({
  entry: 'src/index.js',
  plugins: [
    brotli()
  ]
}).then(/* ... */)
```


### Configuration

```js
brotli({
  options: {
    chunkSize: 32 * 1024
    // ...
  },
  additional: [
    'dist/bundle.css'
  ],
  minSize: 1000
})
```

**options**: Brotli compression options  
The options available are the [Class: BrotliOptions](https://nodejs.org/docs/latest-v10.x/api/zlib.html#zlib_class_brotlioptions).

**additional**: Compress additional files  
This option allows you to compress additional files that were created by other Rollup plugins.

As the `onwrite` callback for all plugins is executed in the same order they are listed in the `plugins` array, this might only work if the brotli plugin is positioned after all other plugins that create additional files.  
**minSize**: Minimum size for compression

Specified the minimum size in Bytes for a file to get compressed.  
Files that are smaller than this threshold will not be compressed.  
This applies to both the generated bundle and specified additional files.


## License

MIT

---
_Source: https://npm.io/package/@tadashi/rollup-plugin-brotli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
