dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

Make the asset collection keep track of all of the destinations (#3467)

Open Destroyerrrocket opened this issue 11 months ago • 1 comments

This fixes the issue I mentioned in #3467, where the use of two asset! macro usages was not being treated correctly by the handler.

BEFORE you merge: Please notice that the code at: packages/cli/src/serve/handle.rs is ""wrong"" (and it was wrong before as well). It does a simple file copy without checking if it needs to be processed in any way, which is likely to lead to issues when dealing with images. I have not encountered this problem though and I don't know what purpose it serves. If you consider this to be an issue, I'd encourage you to make an issue about it.

Destroyerrrocket avatar Dec 29 '24 13:12 Destroyerrrocket

HashMap<PathBuf, HashMap<PathBuf, BundledAsset>>

It might make sense to just store HashMap<PathBuf, HashSet<BundledAsset>> instead of a nested hashmap since the BundledAsset struct already contains the bundled path and it looks like the hashmap value is never used.

I opened an issue here about hot reloaded assets not getting processed: https://github.com/DioxusLabs/dioxus/issues/3471

ealmloff avatar Dec 30 '24 16:12 ealmloff

This was fixed in https://github.com/DioxusLabs/dioxus/pull/3988

ealmloff avatar Jun 23 '25 18:06 ealmloff