feat: convert all files to esm

This commit is contained in:
Devin Haska 2024-10-03 22:52:20 -07:00
parent ef6923ece6
commit e8fd3a17d2
34 changed files with 202 additions and 228 deletions

View file

@ -1,6 +1,6 @@
const htmlmin = require("html-minifier-terser");
import htmlmin from "html-minifier-terser";
module.exports = (eleventyConfig) => {
export default function (eleventyConfig) {
eleventyConfig.addTransform("html-minify", (content, path) => {
if (path && path.endsWith(".html")) {
return htmlmin.minify(content, {
@ -17,4 +17,4 @@ module.exports = (eleventyConfig) => {
}
return content;
});
};
}