Skip to content

Commit

Permalink
Change precedence of nunjucks searchPaths
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Nov 20, 2024
1 parent c62dcdf commit 95db584
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/nunjucks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`
*
Expand Down

0 comments on commit 95db584

Please sign in to comment.