DioxusLabs / dioxus

Fullstack GUI library for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
19.3k stars 735 forks source link

Fail to Read `dist/__assets_head.html` #2231

Closed photino closed 2 months ago

photino commented 2 months ago

Problem

We have upgraded to Dioxus 0.5 in our application framework Zino. The dioxus-desktop example outputs the following error:

ERROR dioxus_desktop::protocol: Failed to read "D:\\code\\git\\github\\zino\\examples\\dioxus-desktop\\dist\\__assets_head.html"

It is somewhat annoying. How can we fix it if the file does not exists?

Steps To Reproduce

Steps to reproduce the behavior:

Expected behavior

No errors.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment:

Questionnaire

ealmloff commented 2 months ago

That error will go away if you build your application with the dioxus cli with dx serve. Without the head file, manganis assets will not be preloaded and css files will not be injected into the head. If you are interested in fixing this issue, you can downgrade this error to a warning about assets not being preloaded if the application is not built with the dioxus cli