From 934d9f20ea2870178be3540b5615add06758d958 Mon Sep 17 00:00:00 2001 From: Naomi Pentrel <5212232+npentrel@users.noreply.github.com> Date: Mon, 20 Jan 2025 21:06:35 +0100 Subject: [PATCH] Minify html in production --- netlify.toml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 netlify.toml diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000000..e2b47b6e64 --- /dev/null +++ b/netlify.toml @@ -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