trunk-rs/trunk

Feature request: preload option for copy-file assets

Offen

#787 geöffnet am 01.05.2024

 (1 Kommentar) (2 Reaktionen) (0 zugewiesene Personen)Rust (315 Forks)auto 404
enhancementhelp wanted

Repository-Metriken

Stars
 (4.347 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Hello,

It would be nice to have a shortcut to also preload a copied file.

Instead of this:

<link data-trunk rel="copy-file" href="assets/ui/button.svg" />
<link rel="preload" as="image" href="button.svg" />

Just write something like that:

<link data-trunk data-preload="image" rel="copy-file" href="assets/ui/button.svg" />

Contributor Guide