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
url become case sensitive after build, the wrong case will lead to 404
Reproduction
Just create a md file like Hello.md, and set path as path/to/hello in .vitepress/config.ts,
then I can access this page by path/to/hello when run docs:dev
but after build, this url is 404 page, even if I try path/to/Hello.
Only if I modify path/to/hello to path/to/Hello in .vitepress/config.ts, this url can work again after build
This actually depends on how you're serving your site. Like if you open https://vitepress.dev/GUIDE/GETTING-STARTED, it would work fine too -- Netlify handles the normalization automatically. And it's working on dev because you're on Windows. On case-sensitive file systems like linux or webcontainers, mismatched case in urls won't work in dev too.
And I'm not sure if we should fix this. This was intentionally done in Vite because many folks deploy on Linux but use Windows or macOS for development. There was inconsistency between local preview and final deploy because of that. Refer vitejs/vite#10475
Describe the bug
url become case sensitive after build, the wrong case will lead to 404
Reproduction
Just create a md file like
Hello.md
, and set path aspath/to/hello
in.vitepress/config.ts
,then I can access this page by
path/to/hello
when rundocs:dev
but after build, this url is 404 page, even if I try
path/to/Hello
.Only if I modify
path/to/hello
topath/to/Hello
in.vitepress/config.ts
, this url can work again after buildExpected behavior
Expect case unsensitive after build
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: