-
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
Use export type instead of export to reduce bundle size #101796
Use export type instead of export to reduce bundle size #101796
Conversation
88b02ab
to
564e551
Compare
Pinging @elastic/kibana-app-services (Team:AppServices) |
10kb ? less then 1% change, do you think its worth it ? |
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.
Kibana app changes LGTM
Yea, it's a small gain, but if we do it everywhere, it could add up. @tylersmalley or @spalger - what do you think? Is using |
I really don't think that thinking of a 10kb size change as "less than 1%" is helpful, it's a 10kb change and that's important. Reducing our bundles by 2-3mb is made up of lots of little 10kb changes. I think that one of the reasons this is only 10kb is because it's the first place we're doing this, and I think that if we make it a habit across the team and use |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Page load bundle
History
To update your PR or re-run it, just comment with: |
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.
code LGTM
* Use export type instead of export to reduce bundle size * Update legacy docs * update docs again Co-authored-by: Kibana Machine <[email protected]>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…02344) * Use export type instead of export to reduce bundle size * Update legacy docs * update docs again Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Stacey Gammon <[email protected]>
It appears that using
export { AType } from '..'
increases the bundle size, even though they are only types. Lets see what happens if we convert a bunch of those toexport type { AType } from '...'
in the data plugin, see if bundle size is reduced by a lot.