Skip to content

Commit

Permalink
Minify html in production
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel committed Jan 20, 2025
1 parent 8f1e34f commit 934d9f2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[[plugins]]

# https://github.com/philhawksworth/netlify-plugin-minify-html#readme
package = "netlify-plugin-minify-html"

# Specify which deploy contexts we'll minify HTML in.
# Supports any Deploy Contexts available in Netlify.
# https://docs.netlify.com/site-deploys/overview/#deploy-contexts
[plugins.inputs]
contexts = [
'production',
'branch-deploy',
'deploy-preview'
]

# Optionally, override the default options for the minification
# https://github.com/kangax/html-minifier#options-quick-reference
[plugins.inputs.minifierOptions]
removeComments = true
collapseInlineTagWhitespace = true

0 comments on commit 934d9f2

Please sign in to comment.