# @duhongwei/hotpack-compress

> hotpack plugin compress

Latest version **0.4.1** (published 2022-09-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @duhongwei/hotpack-compress
pnpm add @duhongwei/hotpack-compress
yarn add @duhongwei/hotpack-compress
bun add @duhongwei/hotpack-compress
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.1 |
| Published | 2022-09-05 |
| First published | 2021-07-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | duhongwei |

## Links

- npm: https://www.npmjs.com/package/@duhongwei/hotpack-compress
- Repository: https://github.com/duhongwei/hotpack-compress
- Homepage: https://github.com/duhongwei/hotpack-compress#readme
- Issues: https://github.com/duhongwei/hotpack-compress/issues
- npm.io page: https://npm.io/package/@duhongwei/hotpack-compress

## Dependencies (3)

- [clean-css](https://npm.io/package/clean-css.md) ^5.3.1
- [uglify-js](https://npm.io/package/uglify-js.md) ^3.17.0
- [html-minifier](https://npm.io/package/html-minifier.md) ^4.0.0

## Recent versions

- 0.4.1 (latest) — 2022-09-05
- 0.4.0 — 2021-08-19
- 0.3.0 — 2021-07-30

## README

# Hotpack-compress
[hotpack](https://github.com/duhongwei/hotpack) plugin compress

Contains three modules

- [uglify-js](https://github.com/mishoo/UglifyJS#readme)
- [html-minifier](https://github.com/kangax/html-minifier)
- [clean-css](https://github.com/clean-css/clean-css)

## Usage
```bash
npm install --save-dev @duhongwei/hotpack-compress
```
```js
import compress from '@duhongwei/hotpack-compress'

export default {
  plugin: [
    {
      name: 'compress',
      use: compress,
      opt:{
        //Optional, default is {},options of uglify-js
        js:{},
        //Optional, default is { removeAttributeQuotes: true,collapseWhitespace: true }
        html:{  removeAttributeQuotes: true,collapseWhitespace: true},
        //Optional, default is {compatibility: 'ie9' },options of clean-css 
        css:{compatibility: 'ie9'},
      }
    }
  ]
}
```

---
_Source: https://npm.io/package/@duhongwei/hotpack-compress · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
