-
-
Notifications
You must be signed in to change notification settings - Fork 913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git version of dioxus fails to load collected assets using the Desktop template #2526
Comments
Additionally, if we compile to web instead, it works flawlessly. |
#2258 rewrote large sections of the CLI. With the latest versions of the CLI and dioxus-desktop, I cannot reproduce this issue on macos. From the error message, it looks like desktop is looking for assets in the root directory instead of the |
I can still reproduce it on my end, with the CLI and desktop being the latest git version; I have ensured that through this following command:
|
Hi, I've also had this issue and found something:
fn running_in_dev_mode() -> bool {
// If running under cargo, there's no bundle!
// There might be a smarter/more resilient way of doing this
std::env::var_os("CARGO").is_some()
}
/// Get the asset directory, following tauri/cargo-bundles directory discovery approach
///
/// Defaults to the current directory if no asset directory is found, which is useful for development when the app
/// isn't bundled.
fn get_asset_root_or_default() -> PathBuf {
get_asset_root().unwrap_or_else(|| std::env::current_dir().unwrap())
} |
This is because of #232 and should be fixed shortly :) |
Should be fixed in #2779 |
Problem
When doing
dx serve
Assets are collected to the folder
assets
But spits out this error.
and the example comes out like this:
Steps To Reproduce
Steps to reproduce the behavior:
dx new test-case -o styling=Vanilla -o router=false --subtemplate Desktop
cd test-case
cargo add dioxus --features desktop --git https://github.com/DioxusLabs/dioxus
cargo install --git https://github.com/DioxusLabs/dioxus dioxus-cli
dx serve
Expected behavior
To launch correctly with assets loading.
Temporary fix
dx build
cd dist
./test-case
Environment:
The text was updated successfully, but these errors were encountered: