Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

url become case sensitive after build #2343

Closed
4 tasks done
gyhyfj opened this issue May 5, 2023 · 1 comment
Closed
4 tasks done

url become case sensitive after build #2343

gyhyfj opened this issue May 5, 2023 · 1 comment
Assignees
Labels

Comments

@gyhyfj
Copy link
Contributor

gyhyfj commented May 5, 2023

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 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

Expected behavior

Expect case unsensitive after build

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz
    Memory: 9.27 GB / 15.92 GB
  Binaries:
    Node: 18.16.0 - D:\Program Files\NodeJS\node.EXE
    npm: 9.6.4 - D:\Program Files\NodeJS\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (112.0.1722.68)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    vitepress: latest => 1.0.0-alpha.75

Additional context

No response

Validations

@gyhyfj gyhyfj added the bug: pending triage Maybe a bug, waiting for confirmation label May 5, 2023
@zonemeen zonemeen added bug Something isn't working and removed bug: pending triage Maybe a bug, waiting for confirmation labels May 27, 2023
@zonemeen zonemeen self-assigned this May 27, 2023
@github-actions github-actions bot added the stale label Aug 3, 2023
@brc-dd brc-dd removed the stale label Aug 4, 2023
@github-actions github-actions bot added the stale label Sep 16, 2023
@brc-dd brc-dd added the has-workaround Has workaround, low priority label Sep 17, 2023
@brc-dd
Copy link
Member

brc-dd commented Sep 17, 2023

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

@brc-dd brc-dd removed bug Something isn't working stale labels Sep 17, 2023
@brc-dd brc-dd closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 2023
@brc-dd brc-dd added wont fix and removed has-workaround Has workaround, low priority labels Sep 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants