-
-
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: when the file path is an absolute path, parsing causes parameter loss #10449
Conversation
Would you add a test here?
|
@sapphi-red f7c41be Test added |
packages/vite/src/node/utils.ts
Outdated
if (resolvedUrl.protocol === 'file:') { | ||
resolvedUrl = pathToFileURL(url) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that this condition should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yzydeveloper Would you remove this condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sapphi-red This condition has been removed. 5a42330
I confirmed this PR fixes #10278. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Description
Fixes #10448
When the file path is an absolute path
For example
E:/_yzydeveloper/vite-resolve-url-encode/node_modules/@ui/components/Test.vue?vue&type=template&lang.js
new URL
will resolve toThe protocol at this time is
e:
,causedpathToFileURL
processing error,cause parameter loss.error handling
normal handling
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).