dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

Assets are not served with Web + fullstack on workspace (0.7.0-alpha.1)

Open sonicjhon1 opened this issue 8 months ago • 2 comments

Problem Dioxus 0.7.0-alpha.1 running web + fullstack (Axum). Assets aren't served and returns 404:

GET
http://127.0.0.1:8080/assets/main-8529d356a299455.css
[HTTP/1.1 404 Not Found 3ms]

GET
http://127.0.0.1:8080/assets/dioxus-architecture-diagram-ebec28cc7d284bd2.webp
[HTTP/1.1 404 Not Found 3ms]
$ ls target/dx/server/debug/web/assets/

$ ls target/dx/web/debug/web/public/assets/
.rw-r--r-- 252k sonicj  5 Jun 13:24  dioxus-architecture-diagram-ebec28cc7d284bd2.webp
.rw-r--r--  140 sonicj  5 Jun 13:24  main-8529d356a299455.css

I have a reproduceable repo: https://github.com/sonicjhon1/dioxus_bug

Steps To Reproduce

  • $ cargo install [email protected] --locked
  • $ git clone https://github.com/sonicjhon1/dioxus_bug
  • $ cd dioxus_bug
  • $ dx serve --fullstack true @client -p web --platform web @server -p server --platform server

Expected behavior

The assets should be served normally, like it is done with $ dx serve --platform "web" -p web

Screenshots Broken: dx serve --fullstack true @client -p web --platform web @server -p server --platform server Image

Working: dx serve --platform "web" -p web Image

Environment:

  • Dioxus version: dioxus 0.7.0-alpha.1 (was built without git repository)
  • Rust version:
rustc 1.89.0-nightly (59aa1e873 2025-06-03)
binary: rustc
commit-hash: 59aa1e873028948faaf8b97e5e02d4db340ad7b1
commit-date: 2025-06-03
host: x86_64-unknown-linux-gnu
release: 1.89.0-nightly
LLVM version: 20.1.5
  • OS info:
Arch Linux On WSL 2 (Windows 11 / 10.0.26200)  
Linux 6.6.87.1-microsoft-standard-WSL2
  • App platform: Web + fullstack

Questionnaire Relevant thread on dicord: https://discord.com/channels/899851952891002890/1379766331150307448

sonicjhon1 avatar Jun 05 '25 06:06 sonicjhon1

+1

Nnamdi-sys avatar Jun 07 '25 16:06 Nnamdi-sys

#4212 fixes this issue. It also includes more sensible defaults for the platform of the server and client so you can just do dx serve --platform web @client -p web @server -p server

ealmloff avatar Jun 10 '25 18:06 ealmloff