-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
fix(routing): fix history routerMode #2399
base: master
Are you sure you want to change the base?
Conversation
Cloudflare Pages deployment
|
@ferferga an alternative solution would be to race promise between the absolute and relative config file. |
@Beat-YT I've tested this and this makes a regression to both issues. This is a problem that we've been dealing with for some time and I researched it extensively: the issue when using HTML5 history mode is that the browser can't distinguish between what's a route inside the application and what's the server path. We need the frontend to be as compatible as possible out of the box and currently it is, so it can be hosted out of the box when:
Sadly that means we need the hash history but, believe me, I'd also like to get rid of it. It would be awesome for everybody if we could get rid of any hardcoded
You can quickly reproduce all of this by spinning a Codespace in your branch, replace As for the other commit, it seems fine to me, so that specific one can be cherrypicked. I'll wait for your feedback first, in case I misunderstood something of your implementation and then we can follow with that commit. |
@ferferga Thanks for your reply! Perhaps using a plugin such as vite-plugin-dynamic-base can do the trick? I can PoC the implementation if you are fine with adding said plugin to the project. Otherwise I agree with you that it’s better to keep using the current hash router. |
Quality Gate passedIssues Measures |
I removed the block server addition part to open a new pull request about it. |
@Beat-YT The plugin won't fix anything either (at least unless I'm missing something you saw but I didn't). What Vite does is hardcode whatever string is given to the |
The logic to determine the base path is up to us to make. I was thinking we could add and ENV to the docker to set the base path accordingly, much like the config is being edited at runtime via the environment variables. |
aad87ab
to
a2cdbb4
Compare
acb6ecf
to
5d6a7c8
Compare
c360429
to
f3260d9
Compare
fe041a3
to
3fbf550
Compare
Fixes
Description
allowServerSelection
configuration setting../
, causing static assets to be pathed incorrectly (e.g.,/server/assets/example.png
instead of/assets/example.png
when on/server/login
).Testing
allowServerSelection
is false.