Skip to content
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

Unable to correctly parse dynamic import #18

Open
larowlan opened this issue Apr 11, 2024 · 4 comments
Open

Unable to correctly parse dynamic import #18

larowlan opened this issue Apr 11, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@larowlan
Copy link
Owner

{% include 'images/animated-icon-' ~ modifier_class ~ '.svg' %}

When we spot includes this ends up being images/animated-icon-

@larowlan larowlan added the bug Something isn't working label Apr 11, 2024
@norbertschad
Copy link

Don't now whether it helps, but I've found that pluckIncludes(template.tokens) will deliver an array with the single parts of the import file instead of the resolved filename.

[  'images/animated-icon-',
   'modifier_class',
   '~',
   '.svg'
]

As the first element is then used to load the first include, of course the file is not found.

@larowlan
Copy link
Owner Author

Yeah that's consistent with what I was seeing too - thanks

@dantedubonc
Copy link

Is there a fix or workaround for this?

@larowlan
Copy link
Owner Author

Not yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants