Bundling SSG is broken
Problem
Steps To Reproduce
Hi I'm trying to migrate my portfolio template from 0.6 to 0.7. I followed instructions here https://dioxuslabs.com/learn/0.7/essentials/fullstack/static_site_generation and it worked before in dx 0.6. You mentioned in the documentation that non-deterministic code will cause some errors, but my code does not have any random components.
Steps:
- Clone the repo with
dx0.7branch https://github.com/ifsheldon/hack-portfolio/tree/dx0.7 - Run
dx bundle --web --ssg --release(I added--releasesince otherwise it will generate debug artifacts) - Serve the public folder with
dufs:cd target/dx/hack-portfolio/release/web/public/ && dufs -A --port 80 - When open
index.html, get a blank page and errors like below in the console
Expected behavior
A working website
Screenshots
Environment:
- Dioxus version:
0.7.1 - Rust version:
1.91.1 - OS info: macOS 26.1
- App platform: fullstack
Questionnaire
It looks like this issue is specific to the dx bundle command. Running the same project with dx build produces the right output. bundle and build should do the same thing for ssg apps, but it looks like bundle is currently skipping the prerender step
OK, so should I wait for the bugfix? Or, is dx build pretty much the same in this case so that I can just use dx build instead?
If you want, you can use my repo and add it as an end-to-end test.
We should fix this with bundle, but dx build --web --ssg --release does the exact same thing bundle should do for ssg builds