Skip to content

Commit 6ab41cf

Browse files
authored
Minify html in production (#3876)
1 parent 8f1e34f commit 6ab41cf

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

netlify.toml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[[plugins]]
2+
3+
# https://github.com/philhawksworth/netlify-plugin-minify-html#readme
4+
package = "netlify-plugin-minify-html"
5+
6+
# Specify which deploy contexts we'll minify HTML in.
7+
# Supports any Deploy Contexts available in Netlify.
8+
# https://docs.netlify.com/site-deploys/overview/#deploy-contexts
9+
[plugins.inputs]
10+
contexts = [
11+
'production',
12+
'branch-deploy',
13+
'deploy-preview'
14+
]
15+
16+
# Optionally, override the default options for the minification
17+
# https://github.com/kangax/html-minifier#options-quick-reference
18+
[plugins.inputs.minifierOptions]
19+
removeComments = true
20+
collapseInlineTagWhitespace = true

0 commit comments

Comments
 (0)