-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
fix(html): transform relative path with long base in /index.html #10990
Conversation
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
It would be nice to add a unit test for |
I also found that there is already a test case here to test the |
It seems like there's a case that's not currently tested if there's a bug that this is fixing so it'd be nice to address that. I thought a unit test might be a lightweight way to do it, but whether it's a unit test or integration test probably doesn't matter so much. |
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
…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
Description
fix: #10989
I found that the url replacer function is not correctly replace the url.
when the devBase is
/a/b/c
originalUrl
/a/b/c/d/e
path.posix.relative(originalUrl, devBase) will be
'../..'
so
./src/mian.ts
will be change to/a/src/main.ts
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).