[chore] Import common react-use methods in shared bundle (#218640)

## 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-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 commit is contained in:
Marco Liberati 2025-04-24 14:13:25 +02:00 committed by GitHub
parent 4f73487143
commit ef323daf52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 54 additions and 6 deletions

View file

@ -90,7 +90,7 @@ pageLoadAssetSize:
lens: 76079
licenseManagement: 41817
licensing: 29004
links: 8000
links: 8200
lists: 22900
logsDataAccess: 16759
logsShared: 281060