build: Use ES module system

- Update package.json with type
- Change eleventy config to use import and export
- Add comments for jshint and inspection
This commit is contained in:
sthag 2026-03-04 19:22:55 +01:00
parent 1db7faaf18
commit 43de7d86fa
2 changed files with 52 additions and 48 deletions

View file

@ -1,7 +1,10 @@
const {EleventyHtmlBasePlugin} = require("@11ty/eleventy");
/* jshint strict: false */
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
import {HtmlBasePlugin} from "@11ty/eleventy";
// noinspection JSUnusedGlobalSymbols
export default async function (eleventyConfig) {
eleventyConfig.addPlugin(HtmlBasePlugin);
eleventyConfig.setLiquidOptions({
// greedy: false,
@ -82,4 +85,4 @@ module.exports = function (eleventyConfig) {
templateFormats: ['html', 'liquid', 'njk', 'md']
// pathPrefix: './demo/'
};
};
}