Closed StitiFatah closed 2 weeks ago
Please read the documentation.
{% vite 'your_module_path.js' type='module' %}
Please read the documentation.
{% vite 'your_module_path.js' type='module' %}
I read it but I think you've misread my issue. This syntax is not passing any query parameter, just setting attributes to the script tag, and type="module" is already the default anyway as documented.
Ohh, you want to modify the content of js script? If yes, that's generated by the vite and is out of the scope of this plugin.
Hi,
I want to dynamically pass an ID to some reusable AlpineJS components that'd appear multiple times on the page to do do something like
AlpineJS.initTree(document.querySelector(#id))
to initialize thoseAs per MDN the solution is to have that in the html
And then get the parameters that way inside the js file
Is it possible to reproduce that with this plugin ?
Maybe by getting the resolved url instead of the whole script tag {%vite app/js/foo.js %} provides ?
Thanks in advance