-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Describe the bug
If an article is named GoInt64On32Bit then it will not render the article page properly
Reproduction
https://stackblitz.com/edit/vite-1hjlf9hd?file=docs%2F.vitepress%2Fconfig.ts
Expected behavior
Fix this.
System Info
System:
OS: Windows 11 10.0.26200
CPU: (20) x64 13th Gen Intel(R) CoreT i7-13800H
Memory: 16.60 GB / 31.74 GB
Binaries:
Node: 25.0.0 - C:\Users\bddxg\AppData\Local\pnpm\node.EXE
npm: 11.6.2 - C:\Users\bddxg\AppData\Local\pnpm\npm.CMD
pnpm: 10.24.0 - C:\Users\bddxg\AppData\Local\pnpm\pnpm.CMD
Browsers:
Chrome: 143.0.7499.193
Edge: Chromium (141.0.3537.99)
npmPackages:
vitepress: 2.0.0-alpha.15 => 2.0.0-alpha.15
Additional context
Root of the problem: VitePress builds a .js file called GoInt64On32Bit for this post, but the file name contains a key character: the number 64.
Why is this problem occurring?
In JavaScript, int64 is a special lexical structure. When the VitePress builder handles filenames like GoInt64On32Bit, the following problems may occur.
Filename parsing issues: The filename GoInt64On32Bit contains consecutive numbers and letters, which may be parsed incorrectly by some build tools.
Route generation problems: VitePress's routing system may have thrown an anomaly when handling this particular naming.
Extension Mapping Error: The build tool may be incorrectly mapping routes to .js files instead of .html
Solution.
Rename source files to avoid naming patterns that may cause confusion.
Validations
- Check if you're on the latest VitePress version.
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.