Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juliendargelos/rollup-plugin-html-minifier
Rollup plugin to minify HTML output files using html-minifier.
https://github.com/juliendargelos/rollup-plugin-html-minifier
Last synced: about 1 month ago
JSON representation
Rollup plugin to minify HTML output files using html-minifier.
- Host: GitHub
- URL: https://github.com/juliendargelos/rollup-plugin-html-minifier
- Owner: juliendargelos
- License: mit
- Created: 2019-09-13T09:13:15.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T20:28:21.000Z (almost 2 years ago)
- Last Synced: 2024-03-15T06:04:07.147Z (9 months ago)
- Language: TypeScript
- Homepage:
- Size: 438 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- awesome - html-minifier - minifier. (Plugins / Output)
README
# rollup-plugin-html-minifier
This plugin minifies html files in rollup bundle with [html-minifier](https://github.com/kangax/html-minifier).
## Install
```bash
yarn add rollup-plugin-html-minifier --dev
```or
```bash
npm install rollup-plugin-html-minifier -D
```## Usage
rollup.config.js
```javascript
import htmlMinifier from 'rollup-plugin-html-minifier'export default {
// ...
plugins: [
htmlMinifier({
// These are the default values:// Glob pattern or array of glob patterns to include
include: '*.html',// Glob pattern or array of glob patterns to exclude
exclude: undefined,// Method returning a boolean that filters files to process
// given their name (overrides include and exclude parameters)
filter: undefined,// html-minifier options
options: {}
})
]
}
```Most of the html-minifier options are disabled by default. You need to set some of them to get an actual minification. See [html-minifier options](https://github.com/kangax/html-minifier#options-quick-reference).