chore: addtl cleanup

This commit is contained in:
Cory Dransfeldt 2023-12-11 11:23:17 -08:00
parent f4be912b89
commit 5c32a78752
No known key found for this signature in database
5 changed files with 90 additions and 162 deletions

View file

@ -1,18 +0,0 @@
const htmlmin = require('html-minifier-terser')
const isProduction = process.env.ELEVENTY_ENV === 'production'
module.exports = (eleventyConfig) => {
eleventyConfig.addTransform('html-minify', (content, path) => {
if (path && path.endsWith('.html') && isProduction) {
return htmlmin.minify(content, {
collapseBooleanAttributes: true,
collapseWhitespace: true,
decodeEntities: true,
includeAutoGeneratedTags: false,
removeComments: true,
})
}
return content
})
}