Dev Server: History Mode does not work if the requested url looks like a file #11282
Closed
7 tasks done
Labels
duplicate
This issue or pull request already exists
Describe the bug
Vite does not serve
index.html
when the url ends with a filename.This is a problem for us, as we have routes like
/preview/{filename}
for which we need theindex.html
to be served in development.I understand that the behavior we need can be annoying for other people, as you don't get 404 errors if you reference files incorrectly, so I would be happy with an opt-in solution.
Reproduction
https://stackblitz.com/edit/vitejs-vite-fmjl1q
Steps to reproduce
I need vite to serve
index.html
whenever no local file is found.System Info
Used Package Manager
pnpm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: