-
-
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: reduce bundle size for Object.keys(import.meta.glob(...))
/ Object.values(import.meta.glob(...))
#18666
base: main
Are you sure you want to change the base?
perf: reduce bundle size for Object.keys(import.meta.glob(...))
/ Object.values(import.meta.glob(...))
#18666
Conversation
I think we should optimize |
Thanks for your suggestion. But maybe we just need to optimize |
packages/vite/src/node/__tests__/plugins/importGlob/fixture-a/index.ts
Outdated
Show resolved
Hide resolved
Thanks for the review, the code has been updated. |
import.meta.glob
support query ?nocontent
Object.keys(import.meta.glob(...))
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.
Thanks! LGTM
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.
The linked issue also requests supporting Object.values
, should we not close the issue until that's supported?
As far as I understand, |
I was thinking that the keys could be minimized, like I was also thinking there could be a further optimization in the future where we replace the |
@bluwy Thanks for the detailed instructions. 👍 |
It'd be nice to replace On the other hand, replacing |
Thank you for your guidance. I have processed |
Yeah I think it's worth implementing the |
Object.keys(import.meta.glob(...))
Object.keys(import.meta.glob(...))
/ Object.values(import.meta.glob(...))
Co-authored-by: 翠 / green <[email protected]>
Description
close #18662