Registry / devops / netlify-plugin-terser-html-minifier

netlify-plugin-terser-html-minifier

JSON →
library0.1.2jsnpmunverified

Netlify build plugin to minify all HTML files as a post-processing step using Terser HTMLMinifier (v0.1.2). It runs after the build and reduces HTML file sizes by removing whitespace, comments, optional tags, and minifying inline CSS and JS. Configuration is done via netlify.toml with full HTMLMinifier options support. Limited community plugin with no active release cadence; alternatives include official Netlify plugins or build scripts.

npm install netlify-plugin-terser-html-minifier
INSTALL
IMPORT
SIG · NETLIFY-PLUGIN-TER
N
netlify-plugin-terser-html-minifier
devopsjavascriptv0.1.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Plugin
Add to netlify.toml [[plugins]] package = "netlify-plugin-terser-html-minifier"
import netlifyPlugin from 'netlify-plugin-terser-html-minifier'
This is a Netlify build plugin, not a JavaScript library. It is configured in netlify.toml, not imported in code.

Netlify plugin configuration in netlify.toml with minifier options.

// Configure in netlify.toml: [[plugins]] package = "netlify-plugin-terser-html-minifier" [plugins.inputs.minifierOptions] removeAttributeQuotes = true collapseBooleanAttributes = true collapseWhitespace = true removeComments = true sortClassName = true sortAttributes = true html5 = true decodeEntities = true removeOptionalTags = true minifyCSS = true minifyJS = true
Debug
Known issues
gotchaPlugin only processes HTML files after build. Ensure HTML files are in publish directory.
fix
Verify netlify.toml publish directory is correct.
affects: >=0.0.0
deprecatedhtml-minifier-terser is a fork; original html-minifier may have different options.
fix
Check html-minifier-terser documentation for option compatibility.
affects: >=0.1.0
Errors
Common errors & fixes
Plugin netlify-plugin-terser-html-minifier not found
Package not installed in project dependencies.
fix
npm i -D netlify-plugin-terser-html-minifier
Config validation error: unknown key minifierOptions
Typo in netlify.toml plugins.inputs section.
fix
Use exact key 'minifierOptions' (case-sensitive).
Upgrade
Version history
0.1.2latest on npm
Audit
Dependencies
html-minifier-terserrequiredCore minification library for HTML compression
Agent activity
2 hits · last 30 days
node
2
Resources
netlify-plugin-terser-html-minifier — npm install netlify-plugin-terser-html-minifier · libregistry