-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Respect base_path
when pre-rendering static routes
#3958
base: main
Are you sure you want to change the base?
Conversation
The fallback route issue sounds like #3644. I don't think it is related. Content doubling could be caused by a hydration issue caused by #3644 We use playwright to test regressions for some similar issues. You can add the playwright test to this folder. You will need to add a new crate with the base path, and a playwright js test file. The fullstack test might be a good starting point |
860e792
to
a6e7426
Compare
I've added a Playwright test for serving an app with However, I struggled adding a test for the bundling and SSG case. When I run the commented-out command in Additionally, is there a way to specify the port? I tried using I've also added |
You might need to pull in the latest commits from main. 12c6938#diff-62798fdae610a4cce6fb5d11419a6306a2381d67743e0ea2a50c1729470e8e6b fixes the post body the CLI sends to the server for SSG.
|
My branch is already up-to-date with
The I also noticed that running |
This pull request fixes #3942 by passing the
base_path
from theAppBundle
topre_render_static_routes
and using it to construct the URL accordingly.I would like to add a test harness to verify that the
base_path
is always respected. However, I'd appreciate some guidance on how best to integrate such tests if that's something you'd like to see.While investigating this issue and testing the example app from #3942 (https://github.com/Gisleburt/dioxus-base-path-issue), I also encountered two additional problems that might be unrelated:
Sometimes content is duplicated or even triplicated.

When a non-existent page is requested, the bundle throws an error but then returns a 200 status and renders the homepage without duplicated content.

The error:
Any feedback or guidance on my fix, the test harness for
base_path
, and whether you think the other two problems are related or if I should open new issues for them (I couldn't find any open Issues mentioning them) would be much appreciated.