x-govuk / govuk-eleventy-plugin

Write documentation using Markdown and publish it using GOV.UK styles.
https://x-govuk.github.io/govuk-eleventy-plugin/
MIT License
53 stars 13 forks source link

If govuk-eleventy-plugin is used in a project with a different govuk-frontend version nunjucks fails to load templates #96

Closed jeff-horton-ho-sas closed 1 year ago

jeff-horton-ho-sas commented 1 year ago

If there is a version conflict between a govuk-eleventy-plugin dependency and the host project's dependencies, npm will include the expected version in a nested node_modules folder. https://github.com/x-govuk/govuk-eleventy-plugin/blob/main/lib/nunjucks.js doesn't check for this and register's the host project's version. If this is missing any of the components the eleventy plugin uses the site fails to build with template not found errors.

jeff-horton-ho-sas commented 1 year ago

I have fix for this, PR will be incomming shortly...