-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Visiting index with Root Slash and Base normalizes URL in dev #1258
Comments
AFAICT this is fine, but feel free to elaborate if you believe otherwise and I'll then re-open. |
Well this is a huge pain because there is no way to actually open the index page when base is specified. In essence; without this fix, vike does not support vite base. |
You can set the base to |
We have multiple product surfaces and we do not have it as a single spa. Using base /local breaks relative redirects. Vite reference: |
I'm not sure I understand your point. |
Sorry about that. The base property for vite expects it to have a trailing slash. Specifically for our case we utilise relative links (not vike router or react router spa) when sending users from landing page (/) to auth (/auth) and app (/app). Those would break with base=/local because relative redirect to (app) from /local is /app not /local/app https://vitejs.dev/config/shared-options.html#base Absolute URL pathname, e.g. /foo/ |
That isn't true.
Is there a reason you don't use absolute links? In general, relative links are inherently broken in apps that have mutliple pages. To be clear: I'm not saying Vike shouldn't support Base URLs with a trailing slash, but it doesn't seem high priority either. |
👍
Relative Base URLs also don't make much sense for multi-page apps, see #606. |
Reproduction: https://github.com/brillout/vike-reprod-1258. |
Fixed and pre-released as @AleksandarFaraj Btw. would your company be up for sponsoring? |
Description
I am trying to create an index page with a vite base path.
Expected:
Actual:
The text was updated successfully, but these errors were encountered: