Closed RobLoach closed 7 years ago
Ok, so I think I've found it, I think nunjucks has problems with relative paths, or at least the ../
part. Changing
{% include "../lib/include.html" %}
to {% include "lib/include.njk" %}
works.
Of course for this to work you'll have to set path
to a base that all templates have in common, from which you'll be able to do your includes etc.
Now the weird thing is that setting the path
option
doesn't work anymore when I set the filename
property as well. In jstransformer-nunjucks path
has priority over filename
, so that should mean that nunjucks does something with filename
that prevents this from working, no idea what though.
Might be related to: https://github.com/mozilla/nunjucks/issues/642#issuecomment-173408151
This tests the issue brought up in #10 . Thanks, @ismay. We should figure out why .compile doesn't modify the include paths.