diff --git a/.eleventy.js b/.eleventy.js index 2bd338ab..4259ffdc 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,14 +1,17 @@ -const { EleventyRenderPlugin } = require("@11ty/eleventy"); -const Image = require("@11ty/eleventy-img"); -const Sharp = require("sharp"); -const fs = require("fs"); -const path = require("path"); -const { EleventyHtmlBasePlugin } = require("@11ty/eleventy"); -const hljs = require("highlight.js"); -const markdownIt = require("markdown-it"); -const markdownAnchor = require("markdown-it-anchor"); - -module.exports = function (eleventyConfig) { +import { RenderPlugin, HtmlBasePlugin } from "@11ty/eleventy"; +import Image from "@11ty/eleventy-img"; +import Sharp from "sharp"; +import fs from "fs"; +import path from "path"; +import hljs from "highlight.js"; +import markdownIt from "markdown-it"; +import markdownAnchor from "markdown-it-anchor"; +import UpgradeHelper from "@11ty/eleventy-upgrade-help"; +const __dirname = path.resolve(); + + + +export default function (eleventyConfig) { let options = { html: true, breaks: true, @@ -41,8 +44,8 @@ module.exports = function (eleventyConfig) { }), ); - eleventyConfig.addPlugin(EleventyRenderPlugin); - eleventyConfig.addPlugin(EleventyHtmlBasePlugin); + eleventyConfig.addPlugin(RenderPlugin); + eleventyConfig.addPlugin(HtmlBasePlugin); eleventyConfig.addWatchTarget("./scss/"); diff --git a/package.json b/package.json index 178f7b2e..c0904e95 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "haxeflixel.com", "version": "0.2.0", "description": "New DocPad project without using a skeleton", + "type": "module", "repository": { "type": "git", "url": "https://github.com/HaxeFlixel/haxeflixel.com.git" @@ -30,7 +31,7 @@ "fix:prettier": "prettier . --write" }, "devDependencies": { - "@11ty/eleventy": "^2.0.1", + "@11ty/eleventy": "^3.0.0", "@11ty/eleventy-img": "^4.0.2", "@liquify/prettier-config": "^1.2.1", "@shopify/prettier-plugin-liquid": "^1.4.4",