Describe the bug
Since version 7.0.5, vite devserver serves source files instead of index.html when the url path matches the basename of a file inside the project.
originally reported here: TanStack/router#5052
Reproduction
https://stackblitz.com/edit/vitejs-vite-sfcqpwnb
Steps to reproduce
- go to https://stackblitz.com/edit/vitejs-vite-sfcqpwnb
- click on "open preview in new tab"
- click on "click me" that opens the dev server at
/test
- you will see the contents of
test.js served from /test
here is the same project with vite 7.0.4 that works as expected:
https://stackblitz.com/edit/vitejs-vite-tgbe56vv
System Info
starts happening since vite 7.0.5
Used Package Manager
npm
Logs
No response
Validations
Describe the bug
Since version 7.0.5, vite devserver serves source files instead of index.html when the url path matches the basename of a file inside the project.
originally reported here: TanStack/router#5052
Reproduction
https://stackblitz.com/edit/vitejs-vite-sfcqpwnb
Steps to reproduce
/testtest.jsserved from/testhere is the same project with vite 7.0.4 that works as expected:
https://stackblitz.com/edit/vitejs-vite-tgbe56vv
System Info
Used Package Manager
npm
Logs
No response
Validations