feat: convert all files to esm
This commit is contained in:
parent
ef6923ece6
commit
e8fd3a17d2
34 changed files with 202 additions and 228 deletions
|
@ -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;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue