-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{% include %} tags do not accept arbitrary expressions #115
Comments
Thank you for your report, will look at this issue on the weekend. |
I have add warnings for such imports. Full support is on the way. |
This would be a huge help to have supported. Any news or tips for workarounds? |
I have started to refactor imports/assets in #121 to use same flow for both to load dynamic assets (imports with variables), but it's still WIP. |
A little bump here. Is this still under development? |
Yes, it still priority. Loader code is a bit of mess. I planned to convert it to TS first, to have more control over all the abstractions. |
@wardourdigital @jacobfentress Did anyone figure out a solution for this? I'm also having the same issue when including a named template inside a Macro.
|
Hello, still on it. Sorry for delay. |
Environment
Node version: v14.16.0
simple-nunjucks-loader version: 3.1.0
webpack version: 5.37.1
Webpack
Describe the bug
According to the documentation of nunjucks:
include actually accepts any arbitrary expression, so you can pass anything into it, as long as the expression evaluates to a string or a compiled Template object: {% include name + ".html" %}.
Include
When I attempted to do this:
I get the error:
Expected behavior
For the named template to be included into the page.
The text was updated successfully, but these errors were encountered: