diff --git a/.eleventy.js b/.eleventy.js index c3a8724..ef41c1e 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -490,7 +490,7 @@ module.exports = function (eleventyConfig) { eleventyConfig.addTransform("htmlMinifier", (content, outputPath) => { if ( - process.env.NODE_ENV === "production" && + (process.env.NODE_ENV === "production" || process.env.ELEVENTY_ENV === "prod") && outputPath && outputPath.endsWith(".html") ) { @@ -498,6 +498,8 @@ module.exports = function (eleventyConfig) { useShortDoctype: true, removeComments: true, collapseWhitespace: true, + conservativeCollapse: true, + preserveLineBreaks: true, minifyCSS: true, minifyJS: true, keepClosingSlash: true,