You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It has to do with the fact that we configure multiple "entry points" in the nunjucks render call (for layouts, templates and components; html.js L29-31). It seems to try them in the specified order, which happens to have templates before components. It then finds a matching template with the same path as the component, causing an infinite loop and then a call stack overflow.
I've tried to be explicit in passing the full path to the {% component %} tag's render call, but it won't accept it. It seems like it needs to be relative to one of the previously provided entry points.
Quick fix for this scenario would be to switch the order of the templates and components entry point listing (tested; works) but I'm not sure if that won't cause other issues.
The build process of NJK crashes if the component name is the same as the template name while using the component plugin.
Steps to reproduce:
templates/example/example.njk
components/example/example.njk
The text was updated successfully, but these errors were encountered: