2.0.0 • Published 3 months ago
@sergeymakinen/vite-plugin-html-minimize v2.0.0
@sergeymakinen/vite-plugin-html-minimize
This plugin is a HTML minimizer/minifier for Vite
Usage
// vite.config.js
import htmlMinimize from '@sergeymakinen/vite-plugin-html-minimize'
export default {
plugins: [
htmlMinimize({
filter: /\.x?html?$/
})
]
}
Options
filter
- Type:
RegExp | ((fileName: string) => boolean)
Default:
/\.html?$/
Regular expression or function to filter assets by file name.
minifierOptions
- Type:
import('html-minifier-terser').Options
Default:
{ collapseWhitespace: true, html5: true, keepClosingSlash: true, minifyCSS: true, minifyJS: true, removeAttributeQuotes: true, removeComments: true, removeRedundantAttributes: true, removeScriptTypeAttributes: true, removeStyleLinkTypeAttributes: true, useShortDoctype: true, }
Minifier options passed to html-minifier-terser.
2.0.0
3 months ago
1.0.6
1 year ago
1.0.5
1 year ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
3 years ago
1.0.0-alpha.1
3 years ago
1.0.0-alpha.0
3 years ago