From de42d20601f9806aba41b66ebbd8e1dfe3b0a8ff Mon Sep 17 00:00:00 2001 From: Frankie Roberto Date: Sun, 1 Dec 2024 21:36:32 +0000 Subject: [PATCH] Switch to ESM imports (#91) Updates to use ESM imports now that Eleventy v3 supports it. (Thanks to @paulrobertlloyd for the idea in https://github.com/x-govuk/x-govuk.github.io/pull/151) --- eleventy.config.js | 6 +++--- package.json | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/eleventy.config.js b/eleventy.config.js index 157aa42..692f979 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -1,7 +1,7 @@ -const govukEleventyPlugin = require('@x-govuk/govuk-eleventy-plugin') -const rssPlugin = require("@11ty/eleventy-plugin-rss"); +import govukEleventyPlugin from '@x-govuk/govuk-eleventy-plugin' +import rssPlugin from "@11ty/eleventy-plugin-rss" -module.exports = function(eleventyConfig) { +export default function(eleventyConfig) { eleventyConfig.addPlugin(rssPlugin); diff --git a/package.json b/package.json index d74f148..7cc1fde 100644 --- a/package.json +++ b/package.json @@ -15,5 +15,6 @@ "@11ty/eleventy": "^3.0.0", "@x-govuk/govuk-eleventy-plugin": "^6.7.0" }, - "private": true + "private": true, + "type": "module" }