-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Milestone
Description
Describe the bug
If you use e.g.
base:'/basepath/'
then curl localhost:3000/basepath/src/main.ts
should return src/main.ts
but
curl localhost:3000/src/main.ts
should return 404.
Right now
localhost:3000/src/main.ts
returns a HTML page in the browser, saying you probably meant localhost:3000/basepath/src/main.ts but if you request the resource from a script, it is happily served
Reproduction
https://github.com/Artur-/vite-vaadin-problem5
npm i
npm run dev
curl localhost:3000/src/main.ts
should return 404
System Info
System:
OS: macOS 11.6
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 108.13 MB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
Yarn: 1.22.11 - /usr/local/bin/yarn
npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
Watchman: 2021.10.04.00 - /usr/local/bin/watchman
Browsers:
Brave Browser: 93.1.29.81
Chrome: 95.0.4638.69
Chrome Canary: 98.0.4701.0
Firefox: 93.0
Safari: 15.1
Safari Technology Preview: 15.4
npmPackages:
vite: ^2.6.4 => 2.6.14
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.
Metadata
Metadata
Assignees
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)