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

When using a base path, resources should not be served without the base path #5656

Closed
7 tasks done
Artur- opened this issue Nov 12, 2021 · 0 comments · Fixed by #5657
Closed
7 tasks done

When using a base path, resources should not be served without the base path #5656

Artur- opened this issue Nov 12, 2021 · 0 comments · Fixed by #5657
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Milestone

Comments

@Artur-
Copy link
Contributor

Artur- commented Nov 12, 2021

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants