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
It prevents everything with a dot inside being redirected to index.html.
When dropping it, it happens that all JS files are redirected to index.html. This is due to await next() being called in all plugins even if they already "handled" the request. Is this intentional?
I'd suggest to:
Adjust server plugins to only call next() when the request was not handled
Use ctx.path instead of removing query and hash from ctx.url in serverPluginServeStatic.ts
Adjust the check for relative paths to ctx.path !== path.resolve(ctx.path)
Would you agree on this? If so I'll file a PR
EDIT: What is even the reason to check for relative paths, I do not yet get this?
Describe the bug
When adding dots to the URL (i.e.
/tag/10.4.1
) vite returns a 404 instead of index.htmlReproduction
n/a
System Info
vite
version: 0.14.2Logs (Optional if provided reproduction)
no logs, just a 404
The text was updated successfully, but these errors were encountered: