Hashless assets (#4312)

* add support for external assets

* fix playwright tests

* add more documentation to with_hash_suffix

* restore external asset hashing tests

* Update gtk workflow dependencies

* fix doc test

* multiple versions of libgtk

* clear dx in playwright tests

* fix fullstack caching test

* try without apt cache

* cache everything except libxdo-dev

* revert ci changes

* fix wasm asset options

* fix merge conflict

* recommend the used attribute instead

* Move options to AssetOptionsBuilder

* Don't deprecate non-canonical new asset options functions

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
Evan AlmloffandJonathan Kelley authored and GitHub committed 2025-06-30 19:21:49 -07:00
1 parent 0bd376b873
commit e74c838441
22 files changed
+569 -316

No files matched your search

@@ -164,18 +164,20 @@ fn DocumentElements() -> Element {
/// Make sure assets in the assets folder are served correctly and hashed assets are cached forever
#[component]
fn Assets() -> Element {
#[used]
static _ASSET: Asset = asset!("/assets/image.png");
#[used]
static _OTHER_ASSET: Asset = asset!("/assets/nested");
rsx! {
img {
src: asset!("/assets/image.png"),
}
// TODO: raw assets support was removed and needs to be restored
// https://github.com/DioxusLabs/dioxus/issues/4115
// img {
// src: "/assets/image.png",
// }
// img {
// src: "/assets/nested/image.png",
// }
img {
src: "/assets/image.png",
}
img {
src: "/assets/nested/image.png",
}
}
}