-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[shared-ui-deps] should handle transitive deps? #102697
Comments
Pinging @elastic/kibana-operations (Team:Operations) |
I think transitive deps should be already bundled. The only thing we need to do if we want to use them is expose them as externals. |
Yeah, we need to explicitly choose which packages we want to expose via externals otherwise we'd be bound to the specific version of each transitive dependency used by the packages in
|
@Dosant do you think we can consider this closed? |
@mistic, I think these changes that @spalger laid out should be at least done for Or are you suggesting this isn't worth pursuing? |
I think that instead of sharing |
In #110558 we split the |
@kbn/shared-ui-deps
is used so that most common dependencies across kibana UI are shared between all the plugins and loaded once (e.g. React, EUI, lodash, etc...)However, when a plugin imports a dependency of one of
@kbn/shared-ui-deps
dependencies it doesn't get imported from a single@kbn/shared-ui-deps
bundle, but it gets bundle into plugin's bundle.For example:
react-intl
instead of@kbn/i18n/react
. Fixing this shaved-386.0KB
in total from async bundlesreact-beautiful-dnd
which is a dependency of EUI: react-beautiful-dnd ~400K per each plugin that uses itSince these transition deps are already bundled into
@kbn/shared-ui-deps
, when importing such in Kibana directly should they be imported from a shared bundle instead of bundling as a separate instance? If we fix this, the safe would likely be significant (looking at two existing known examples of such mentioned above)The text was updated successfully, but these errors were encountered: