From 95db5845745e0c443ca3bbfd23d4302222548c3c Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Wed, 20 Nov 2024 16:55:55 +0000 Subject: [PATCH] Change precedence of nunjucks searchPaths --- lib/nunjucks.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/nunjucks.js b/lib/nunjucks.js index af6e879..2a65b3d 100644 --- a/lib/nunjucks.js +++ b/lib/nunjucks.js @@ -27,16 +27,14 @@ module.exports = (eleventyConfig) => { const { includes, input, layouts } = eleventyConfig.dir const searchPaths = [ - './node_modules/@x-govuk/govuk-eleventy-plugin', - './node_modules/govuk-frontend/dist', - resolveNpmModule('@x-govuk/govuk-prototype-components'), ...(includes ? [path.join(input, includes)] : []), ...(layouts ? [path.join(input, layouts)] : []), - input + input, + './node_modules/@x-govuk/govuk-eleventy-plugin', + './node_modules/govuk-frontend/dist', + resolveNpmModule('@x-govuk/govuk-prototype-components') ] - console.log(searchPaths) - /** * Set default options, but respect `nunjucksEnvironmentOptions` *