dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

base_path does not work with dx bundle

Open Gisleburt opened this issue 11 months ago • 1 comments

Problem

dx bundle doesn't work with base_path

Steps To Reproduce

  • Set up SSG following https://dioxuslabs.com/learn/0.6/guides/fullstack/static_site_generation
  • Set a base_path in Dioxus.toml
  • Attempt to run dx bundle

I've created a minimum repo that demonstrates this bug with a README here: https://github.com/Gisleburt/dioxus-base-path-issue

Expected behavior

Static Site Generation should create a bundle that opperates from base_path

Build Log

 ERROR err=Other(Failed to parse static routes from the server. Make sure your server function returns Vec<String> with the (default) json encoding

Environment:

  • Dioxus version: v0.6.0
  • Rust version: v1.84.1
  • OS info: macOS
  • App platform: web

Questionnaire

I'm interested in fixing this myself but don't know where to start.

Gisleburt avatar Apr 01 '25 21:04 Gisleburt

If you are interested in fixing this, I think we just need to add the base path from the CLI config to the address for the server function here. You can get the base path from the web config in the builder's crate like we do here

ealmloff avatar Apr 01 '25 21:04 ealmloff