Convert config to ESM
build / build (push) Failing after 20s

This commit is contained in:
Claude
2026-08-02 01:40:59 +02:00
parent 90af2ff911
commit c5ecdde630
3 changed files with 11 additions and 7 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
const pug = require("pug");
import pug from "pug";
module.exports = function (eleventyConfig) {
export default function (eleventyConfig) {
eleventyConfig.addPassthroughCopy("src/assets/img");
eleventyConfig.addExtension("pug", {
@@ -21,4 +21,4 @@ module.exports = function (eleventyConfig) {
htmlTemplateEngine: "pug",
markdownTemplateEngine: "pug",
};
};
}
+1
View File
@@ -2,6 +2,7 @@
"name": "octoturge-site",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"build:11ty": "eleventy",
"build:css": "tailwindcss -i ./src/assets/css/tailwind.css -o ./dist/assets/css/style.css --minify",
+7 -4
View File
@@ -1,7 +1,10 @@
const fs = require("fs");
const path = require("path");
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
module.exports = function () {
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default function () {
const localesDir = path.join(__dirname, "..", "locales");
const dict = {};
for (const file of fs.readdirSync(localesDir)) {
@@ -10,4 +13,4 @@ module.exports = function () {
dict[locale] = JSON.parse(fs.readFileSync(path.join(localesDir, file), "utf8"));
}
return dict;
};
}