Skip to content

Commit ee478ea

Browse files
authoredOct 24, 2024··
October 2024 updates (#98)
- Add October 2024 event - Update dependencies (Eleventy v3) - Replace `html-minifier` with `html-minifier-terser`
1 parent 75ffa79 commit ee478ea

File tree

4 files changed

+794
-1004
lines changed

4 files changed

+794
-1004
lines changed
 

Diff for: ‎.eleventy.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
const fs = require("node:fs");
21
const inclusiveLangPlugin = require("@11ty/eleventy-plugin-inclusive-language");
32
const cacheBuster = require("@mightyplow/eleventy-plugin-cache-buster");
43
const pluginSitemap = require("@quasibit/eleventy-plugin-sitemap");
5-
const htmlmin = require("html-minifier");
4+
const { minify: htmlMinify } = require("html-minifier-terser");
65
const { minify } = require("terser");
76
const siteSettings = require("./src/globals/site.json");
87

@@ -43,7 +42,7 @@ module.exports = function (eleventyConfig) {
4342

4443
eleventyConfig.addTransform("htmlmin", function (content, outputPath) {
4544
if (outputPath && outputPath.endsWith(".html")) {
46-
return htmlmin.minify(content, {
45+
return htmlMinify(content, {
4746
useShortDoctype: true,
4847
removeComments: true,
4948
collapseWhitespace: true,

0 commit comments

Comments
 (0)
Please sign in to comment.