-
-
Notifications
You must be signed in to change notification settings - Fork 826
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
External component breaks fullstack with custom Tokio/Axum #2933
Comments
The latest version of |
Originally the reproducilbe was using that logic(copied from my actual repo), but then I removed it to make the demo look succinct. I believe the proxy shouldn't affect/cause the bug(breaking js/wasm when using external components) as I have tested it again with the logic as it still breaks. |
Ok I think I figured out what the issue is here. I copied over all of the logic launch uses into your app and it still didn't work. The issue isn't actually related to axum/fullstack at all.
If you are creating a library for dioxus, you should pull in The reproduction does work when you set the client feature manually when you serve: dx serve --client-feature web |
Can the situation be detected programmatically? If so, we can issue a warning/suggestion to the user. |
Yes, I think we could detect this in the CLI |
Ok, let's start with a clean slate. [dependencies]
dioxus-lib = { git = "https://github.com/DioxusLabs/dioxus.git", rev = "b20db13" }
dioxus-html = { git = "https://github.com/DioxusLabs/dioxus.git", rev = "b20db13" }
manganis = { version = "0.3.0-alpha.1" } The consumer crate(0136fb6) is working as expected. Cool! New SlateOk this is where my whole day was spent on. Somehow, it still breaks when the crates are in a workspace. Let's get started.
There is now a new crate member - ui = { git = "https://github.com/chungwong/rayquaza.git" , rev = "763c722"}
+ ui = { path = "../ui"} Starting the app
Visit http://localhost:8080 and the tab is broken again. |
Problem
Steps To Reproduce
Given two crates and they are using the latest commit 9816b40 (latest or alpha2, doesn't make a difference)
On its own, the ui crate is working good.
❯ git clone https://github.com/chungwong/rayquaza.git ❯ cd rayquaza/crates/ui ❯ dx-9816b40 -V dioxus 0.6.0-alpha.2 (9816b40) ❯ npm install ❯ npx tailwindcss -i ./input.css -o ./assets/tailwind.css --watch ❯ dx-9816b40 serve --example tabs
You will see the the Tab is responsive and its content is changing on http://localhost:8080
Let's try to consume the ui crate, and run it as an example.
❯ git clone https://github.com/chungwong/myrust.git ❯ cd myrust ❯ npm install ❯ npx tailwindcss -i ./input.css -o ./assets/tailwind.css --watch ❯ dx-9816b40 serve --example tabs
On http://localhost:8080, the tab still works
Issue
❯ cd myrust ❯ dx-9816b40 serve
On http://localhost:3000 (port has to change, it cannot be 8080 anymore, may deserve another issue, it is conflicting with the new asset server which is also on 8080),
you will notice the tab is no longer responive and just broken.
Naturally, one may think the UI crate got problem, is it? Let's test it.
Turn this main on and let's run it again
This time, it is http://localhost:8080 again and you will see the tab works again.
The problem is so strange, there is no error, neither in the terminal or the browser side. It looks like it is related to the tokio/axum side but I cannot be sure.
Environment:
The text was updated successfully, but these errors were encountered: