trunk-rs/trunk

Feature request: preload option for copy-file assets

開放

#787 建立於 2024年5月1日

 (1 則留言) (2 個反應) (0 位負責人)Rust (315 個分叉)auto 404
enhancementhelp wanted

倉庫指標

星標
 (4,347 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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" />

貢獻者指南