Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaredLunde/snowpack-plugin-minify-html
Minify HTML in production using html-minifier with Snowpack
https://github.com/jaredLunde/snowpack-plugin-minify-html
html-minifier minify-html snowpack snowpack-plugin
Last synced: 3 months ago
JSON representation
Minify HTML in production using html-minifier with Snowpack
- Host: GitHub
- URL: https://github.com/jaredLunde/snowpack-plugin-minify-html
- Owner: jaredLunde
- License: mit
- Created: 2020-08-27T16:14:45.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-27T16:15:43.000Z (over 4 years ago)
- Last Synced: 2024-09-14T12:18:40.871Z (4 months ago)
- Topics: html-minifier, minify-html, snowpack, snowpack-plugin
- Language: TypeScript
- Homepage:
- Size: 146 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# snowpack-plugin-minify-html
> Minify HTML in production using [html-minifier](https://github.com/kangax/html-minifier#readme) with Snowpack
```sh
npm i snowpack-plugin-minify-html
```---
## When to use this
You should only use this if you aren't already using a bundler (Webpack, Parcel, Rollup) to
build your production site.## Quick start
```js
// snowpack.config.js
module.exports = {
plugins: [
[
'snowpack-plugin-minify-html',
{
/**
* @see Plugin Options below
*/
htmlMinifierOptions: {
sortAttributes: true,
removeComments: true,
},
},
],
],
}
```## Plugin Options
```ts
export interface SnowpackPluginHtmlMinifierOptions {
/**
* An array of glob patterns for files you want to explicitly include
* for html-minifier minification. By default all HTML files are included.
*/
include?: string[]
/**
* An array of glob patterns for files you want to exclude from
* html-minifier minification
*/
exclude?: string[]
/**
* html-minifier minify() options passed directly to html-minifier
* @see https://github.com/kangax/html-minifier#options-quick-reference
*/
htmlMinifierOptions?: htmlMinifier.Options
}
```## LICENSE
MIT