A Vite plugin for HTML processing and minification, currently at version 1.1.0 (stable). It supports Vite 2.3 through 8.x. Key differentiator: uses `@swc/html` (since v0.2.0) for faster, more aggressive minification compared to alternatives like `html-minifier-terser`. Ships TypeScript types and is released via OIDC trusted publishing with immutable releases. Active development, frequent releases aligned with Vite major versions.
npm install vite-plugin-simple-htmlVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import and configure the plugin with custom minification options in a Vite config file.
Review the new default options and adjust configuration in `minify` option accordingly.
Upgrade to v1.1.0 or later to use Vite 8.
Migrate to `@swc/html` minification options.
Add import: `import vitePluginSimpleHtml from 'vite-plugin-simple-html';`
Use ESM import instead of `require`.
Run `npm install vite-plugin-simple-html`.