-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed
Labels
inconsistencyInconsistency between dev & buildInconsistency between dev & buildp2-nice-to-haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)
Milestone
Description
Describe the bug
Multi-page apps created with Vite do not behave consistently between dev and build preview when visiting nested URLs that do not have a trailing slash.
Using the following folder structure:
├── package.json
├── vite.config.js
├── index.html
└── nested
└── index.html
Expected: Both dev and build servers have consistent behavior when visiting <root>/nested
Actual: Dev server shows index.html
from root when visiting <root>/nested
; must use <root>/nested/
instead. Build preview, however, shows nested/index.html
when visiting <root>/nested
.
Reproduction
https://github.com/noahmpauls/vite-bug-multipage-url
System Info
System:
OS: Windows 10 10.0.19043
CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
Memory: 1.02 GB / 7.75 GB
Binaries:
Node: 14.15.5 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.11 - C:\Program Files\nodejs\npm.CMD
npmPackages:
vite: ^2.7.2 => 2.7.13
Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
dementors-magnus, Miroito, denishacquin, dcastil, will-wow and 15 more
Metadata
Metadata
Assignees
Labels
inconsistencyInconsistency between dev & buildInconsistency between dev & buildp2-nice-to-haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)