You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm very new to this project so please correct me if I'm wrong, but it seems to me that there's no way for me to ask {% vite_asset %} to put, say, media="print" on the <link rel="stylesheet" ...> it generates for a given asset.
I've suboptimally worked around this using {% vite_asset_url %} for the time being.
I'll probably take a look at submitting a PR for this a bit later, however it looks quite difficult to accomplish whilst maintaining {% vite_asset %}'s current API.
The text was updated successfully, but these errors were encountered:
KyeRussell
changed the title
Additional properties on CSS inclusion tag
Additional properties on <link rel="stylesheet"> tag
Jul 5, 2024
KyeRussell
changed the title
Additional properties on <link rel="stylesheet"> tag
Additional attributes on <link rel="stylesheet"> tag
Jul 5, 2024
Yep, you're right. Currently we can only assign attributes to the js script tag, not the css stylesheet link. You're also correct that adding this feature would require an update to the API.
I'm very new to this project so please correct me if I'm wrong, but it seems to me that there's no way for me to ask
{% vite_asset %}
to put, say,media="print"
on the<link rel="stylesheet" ...>
it generates for a given asset.I've suboptimally worked around this using
{% vite_asset_url %}
for the time being.I'll probably take a look at submitting a PR for this a bit later, however it looks quite difficult to accomplish whilst maintaining
{% vite_asset %}
's current API.The text was updated successfully, but these errors were encountered: