// This test checks the CLI optimizes assets correctly without breaking them use dioxus::prelude::*; const SOME_IMAGE: Asset = asset!("/images/toasts.png", AssetOptions::image().with_avif()); const SOME_IMAGE_WITH_THE_SAME_URL: Asset = asset!("/images/toasts.png", AssetOptions::image().with_jpg()); #[used] static SOME_IMAGE_WITHOUT_HASH: Asset = asset!( "/images/toasts.png", AssetOptions::image().with_avif().with_hash_suffix(false) ); // This asset is unused, but it should still be bundled because it is an external asset #[used] static _ASSET: Asset = asset!( "/images/toasts.png", AssetOptions::builder().with_hash_suffix(false) ); // Regression coverage for https://github.com/DioxusLabs/dioxus/issues/5512: // `with_minify(false)` must copy the file byte-for-byte (no IIFE rewrap, no // ESM transform), and `with_minify(true)` must keep the script as a classic // script (not ESM) so the `