Skip to content
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

Assets in Dioxus build are "unpacked" from the original directory #2407

Open
tigerros opened this issue May 10, 2024 · 0 comments
Open

Assets in Dioxus build are "unpacked" from the original directory #2407

tigerros opened this issue May 10, 2024 · 0 comments

Comments

@tigerros
Copy link
Contributor

Problem

If I have a directory called assets and a file assets/foo.txt and I set the asset_dir in Dioxus.toml to "assets", the resulting bundle (dist) will contain foo.txt, removing the original assets directory. I know Dioxus has it's own assets directory, but that can just be renamed to some unique name.

Steps To Reproduce

Steps to reproduce the behavior:

  • Create a new app that reads from assets/foo.txt.
  • Set asset_dir to "assets" in Dioxus.toml.
  • Run dx build.
  • Run the executable in dist.
  • Program errors because the file could not be found, but it works with dx serve or cargo run.

Expected behavior

The path should be preserved and behavior kept consistent with dx build, dx serve and cargo run.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment:

  • Dioxus version: 0.5.1 crate, latest git CLI
  • Rust version: 1.78.0
  • OS info: Windows 10
  • App platform: desktop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant