You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the reproduction, you need only navigate to https://vitejs-vite-r5hbbj--5173.local.webcontainer.io/Login/nested-route.
My expectation was that the vite development server would walk the paths upwards, overlapped with the root configuration option until it fins a suitable index.html. Then it would serve that file with a status of 200 while preserving the path. Thus allowing client side routing to kick in.
Let's pretend this URL was used: https://vitejs-vite-r5hbbj--5173.local.webcontainer.io/Login/nested-route-1/nested-route-2/nested-route-3:
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
atrauzzi
changed the title
404s with Multiple Entry Points
Nested path behaviour issue, including for multiple Entry Points
Oct 23, 2022
atrauzzi
changed the title
Nested path behaviour issue, including for multiple Entry Points
Nested path behaviour issue, including for multiple entry points
Oct 23, 2022
Having the same problem using the nested apps. Page refresh always returns the top app's index.html, even though subfolders containing nested apps have their own index.html.
It would be great if Vite.js could provide this functionality at least via plugin. Thank you!
I am facing some issue with mulitple html file app. Has anyone find a solution for this yet?
I am getting a 404 while trying to access main or again directly from the urls.
Its working fine if I open templates/index.html/ .
Describe the bug
I'm currently using multiple entry points:
Whenever I navigate somewhere beneath the applications root, for example
https://my.dev.server/Login/client-side-route
, I end up with a 404.Reproduction
https://stackblitz.com/edit/vitejs-vite-r5hbbj?file=src/Login/App.tsx
Steps to reproduce
Using the reproduction, you need only navigate to
https://vitejs-vite-r5hbbj--5173.local.webcontainer.io/Login/nested-route
.My expectation was that the vite development server would walk the paths upwards, overlapped with the
root
configuration option until it fins a suitableindex.html
. Then it would serve that file with a status of 200 while preserving the path. Thus allowing client side routing to kick in.Let's pretend this URL was used:
https://vitejs-vite-r5hbbj--5173.local.webcontainer.io/Login/nested-route-1/nested-route-2/nested-route-3
:/Login/nested-route-1/nested-route-2/nested-route-3
👉 ⛔src/Login/nested-route-1/nested-route-2/nested-route-3/index.html
, which doesn't exist/Login/nested-route-1/nested-route-2/
👉 ⛔src/Login/nested-route-1/nested-route-2/index.html
, which doesn't exist/Login/nested-route-1/
👉 ⛔src/Login/nested-route-1/index.html
, which doesn't exist/Login/
👉 ✔️src/Login/index.html
, which does exist!Using this strategy, vite can serve multiple sites with support for client-side (HTML5) routing! 🎊
System Info
Used Package Manager
yarn
Logs
See repro. 🙂
Validations
The text was updated successfully, but these errors were encountered: