[chore] Import common react-use methods in shared bundle#218640
Merged
dej611 merged 7 commits intoelastic:mainfrom Apr 24, 2025
Merged
[chore] Import common react-use methods in shared bundle#218640dej611 merged 7 commits intoelastic:mainfrom
dej611 merged 7 commits intoelastic:mainfrom
Conversation
dej611
commented
Apr 23, 2025
nreese
approved these changes
Apr 23, 2025
Contributor
nreese
left a comment
There was a problem hiding this comment.
kibana-presentation changes LGTM
code review only
Contributor
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
jbudz
approved these changes
Apr 23, 2025
Contributor
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Any counts in public APIs
Async chunks
Page load bundle
Unknown metric groupsAPI count
async chunk count
History
|
arturoliduena
approved these changes
Apr 24, 2025
TattdCodeMonkey
approved these changes
Apr 24, 2025
akowalska622
pushed a commit
to akowalska622/kibana
that referenced
this pull request
May 29, 2025
) ## Summary Similar to elastic#217034, elastic#217202 and elastic#217467 this time applied to `react-use`. This is a slightly different approach than elastic#217034 as we're caching here only the most common/frequently used methods from the `react-use` library and leaving the rest to be loaded within the specific plugin chunks. What this PR does it fundamentally: * adds `7.x kb` to the shared bundle * overall the startup bundle size shrinks about `3.5 kb` * the async bundle size shrinks of about `350 kb` (mainly due to 3 imports which were targeting `react-use/lib`). An alternative approach would be to just fix the async import strings in there, but I thought to it was worth it to make the long step here. Feedback appreciated.
This file contains hidden or 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
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.
Summary
Similar to #217034, #217202 and #217467 this time applied to
react-use.This is a slightly different approach than #217034 as we're caching here only the most common/frequently used methods from the
react-uselibrary and leaving the rest to be loaded within the specific plugin chunks.What this PR does it fundamentally:
7.x kbto the shared bundle3.5 kb350 kb(mainly due to 3 imports which were targetingreact-use/lib).An alternative approach would be to just fix the async import strings in there, but I thought to it was worth it to make the long step here. Feedback appreciated.