Closed IHIutch closed 8 months ago
Twig.js supports it so we should be able to support it. I'll add a new test case and report back
I tried playing around with some simpler implementations and noticed that it seemed to work intermittently. But the error that came up (in browser) was always the same fs.statSync
one
Can you give https://github.com/larowlan/vite-plugin-twig-drupal/pull/6 a try? Test in the PR seems to show it working, even with self references. Took me a while to get it going because I naffed up the macro syntax in the test twig files :upside_down_face:
Happy to make a release with #6 if that's easier for testing, it doesn't make things any worse
Seems to be working, locally. Thank you!
Also working in the codesandbox
Cutting a new tag
Tyvm, this plugin has made working with Twig and Storybook so easy!
Does this plugin support Twig macros? I'm trying to use one in
pagination/templates/pagination-unbounded
, but I'm getting the following errorAn error occurred whilst rendering /project/home/ihiutch/workspace/stories/pagination/templates/pagination-unbounded.twig: TypeError: Cannot read properties of undefined (reading 'valueOf')
Codesandbox
**Also, excuse the other files, I found this plugin and am in the midst of migrating (If I can get macros to work!)