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

贡献者指南