-
-
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
perf: move up external url check before fs path checks #13639
Merged
bluwy
merged 2 commits into
vitejs:main
from
suguanYang:perf/move-up-external-condition-before-file-related-conditions
Oct 9, 2023
Merged
perf: move up external url check before fs path checks #13639
bluwy
merged 2 commits into
vitejs:main
from
suguanYang:perf/move-up-external-condition-before-file-related-conditions
Oct 9, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Run & review this pull request in StackBlitz Codeflow. |
@sapphi-red Hi, can you help tp review this? |
suguanYang
force-pushed
the
perf/move-up-external-condition-before-file-related-conditions
branch
from
June 26, 2023 16:39
1a815c4
to
ef41e5b
Compare
@yyx990803 Hi Evan, can you have a look at this? |
bluwy
requested changes
Oct 6, 2023
@bluwy Hi bluwy, thanks for your review and comments, I have made some changes that do not affect the url variable, and this has less impact than the previous one. |
bluwy
reviewed
Oct 9, 2023
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
suguanYang
force-pushed
the
perf/move-up-external-condition-before-file-related-conditions
branch
from
October 9, 2023 07:36
4ab0f43
to
83d957e
Compare
bluwy
approved these changes
Oct 9, 2023
sapphi-red
approved these changes
Oct 9, 2023
bluwy
changed the title
perf: move up external condition before path related conditions
perf: move up external url check before fs path checks
Oct 9, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The real problem:
I was developing a plugin that can distribute the optimizied dependencies, so the resolved id will like this:
https://xxx/react@18.2.0/jsx-runtime
, for vite perspective, the optimized dependencies should all local files, the resolved id will become something like this/@fs/https:/xxx/react@18.2.0/jsx-runtime?v=628f3470
I can not ask vite community to consider my use case, but I think we could optimize this code since there is no meaning that we put the external condition after some file related conditions.
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).