-
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
Support packages and plugins co-existing in the same folder #112886
Comments
Pinging @elastic/kibana-operations (Team:Operations) |
Should we consider following the same strategy for packages that we have for plugins in terms of using "scope" folders, common, public, server? I suspect it will be difficult to merge them without creating consistency. |
I've been thinking about tradeoffs between using packages, plugins, and how discoverability is affected. This seems to offer the best of both worlds. It would be nice to use this with the data and data_views plugins. |
Note, this is currently blocked on #107648, as moving code into packages will increase build times compared to plugins. |
Closing in favor of #128012 |
Problem statement
Our current directory structure, of keeping packages and plugins separate, causes some issues:
1. Increasing bundle size
A developer building a plugin will usually export stateless helper utilities from the index.ts file. This unnecessarily increases bundle size and slows down the page load for every application. We have plugins that don’t need to be plugins at all (kibana_react, kibana_utils).
2. Discoverability
If that developer does understand the benefits of putting stateless code in a package, we’ll end up with related code in two folders that are far away from each other. This leads to duplicate platform utilities, a larger public API footprint, and services that are hard to find.
Goals
Proposal
For example:
Would simply become:
As far as I am aware, the support for this will actually fall out naturally with some of the work the Ops team is already doing.
The text was updated successfully, but these errors were encountered: