Registry / devops / netlify-plugin-minify-html

netlify-plugin-minify-html

JSON →
library0.3.1jsnpmunverified

A Netlify Build Plugin that minifies HTML files in the publish folder after build, using the html-minifier library. Current version 0.3.1, last updated 2021. It runs as a post-processing step, agnostic to the site generator. Similar to other minify plugins but Netlify-specific. Lightweight, zero config, but many SSGs already do this natively.

npm install netlify-plugin-minify-html
INSTALL
IMPORT
SIG · NETLIFY-PLUGIN-MIN
N
netlify-plugin-minify-html
devopsjavascriptv0.3.1
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.

default
// Not imported; configured in netlify.toml
const plugin = require('netlify-plugin-minify-html')
This is a Netlify Build Plugin, not a regular npm module. It is activated via netlify.toml, not via import/require.

Add the plugin to netlify.toml to minify HTML in production deploys.

// netlify.toml [[plugins]] package = "netlify-plugin-minify-html" [plugins.inputs] contexts = ["production"]
Debug
Known issues
deprecatedPlugin may no longer be needed if your SSG already minifies HTML.
fix
Check your SSG's built-in minification; remove plugin if redundant.
affects: >=0.0.0
Upgrade
Version history
0.3.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
netlify-plugin-minify-html — npm install netlify-plugin-minify-html · libregistry