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

transform relative path uncorrectly in /index.html when using long base url #10989

Closed
7 tasks done
candy-Tong opened this issue Nov 19, 2022 · 0 comments · Fixed by #10990
Closed
7 tasks done

transform relative path uncorrectly in /index.html when using long base url #10989

candy-Tong opened this issue Nov 19, 2022 · 0 comments · Fixed by #10990

Comments

@candy-Tong
Copy link
Contributor

Describe the bug

<html lang="en">
  <body>
    <div id="app"></div>
    <script type="module" src="./src/main.ts"></script>
  </body>
</html>

I use relative path in index.html and vite base is /a/b/c
When i visit /a/b/c/d/e, the main.ts url is not correct.
image

Reproduction

https://stackblitz.com/edit/vitejs-vite-yqhjpc?file=vite.config.ts,index.html&terminal=dev

Steps to reproduce

  1. open Reproduction link
  2. change the url path to /a/b/c/d/e

System Info

Yarn: 1.22.15 - D:\Program Files\nodejs\yarn.CMD
    npm: 8.5.0 - D:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (107.0.1418.42)
    Internet Explorer: 11.0.19041.1566

Used Package Manager

pnpm

Logs

No response

Validations

patak-dev pushed a commit that referenced this issue Nov 22, 2022
)

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
fix #10989
fc pushed a commit to fc/vite that referenced this issue Nov 23, 2022
…ejs#10990)

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
fix vitejs#10989
@github-actions github-actions bot locked and limited conversation to collaborators Dec 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant