-
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
[kbn/ui-shared-deps] expand and split #62364
Conversation
Moment.tz.load(require('moment-timezone/data/packed/latest.json')); | ||
|
||
// big deps which are locked to a single version | ||
export const Rxjs = require('rxjs'); |
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.
I'd expect to see lodash
here. it's being overused by every plugin literally
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.
Yeah, the issue is that we don't have a single lodash version
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.
ok. that's almost ~400kB per bundle 😞
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.
Btw, is something like https://www.npmjs.com/package/babel-plugin-transform-imports already in place for libs like lodash?
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.
No, sounds like a great plugin to add
3e7a1e0
to
7c83d04
Compare
Pinging @elastic/kibana-operations (Team:Operations) |
@elasticmachine merge upstream |
Looks like this shaved off a considerable amount of JS 39.77 MB vs 27.87 MB! |
@spalger good effort! I just made a small find. We still have 2 little references in the DLL within respect to packages in the shared deps.
I think we can also work to add those in the shared ui deps only |
I'm sad that |
export const React = require('react'); | ||
export const ReactDom = require('react-dom'); | ||
export const ReactDomServer = require('react-dom/server'); |
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.
maybe we could later investigate why is that being used in the client side code 😃
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* [kbn/ui-shared-deps] expand and split * add two import styles for eui/react-dom that are new Co-authored-by: spalger <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
* [kbn/ui-shared-deps] expand and split * add two import styles for eui/react-dom that are new Co-authored-by: spalger <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
* [kbn/ui-shared-deps] expand and split (#62364) * [kbn/ui-shared-deps] expand and split * add two import styles for eui/react-dom that are new Co-authored-by: spalger <[email protected]> Co-authored-by: Elastic Machine <[email protected]> * update yarn.lock file Co-authored-by: spalger <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
* [kbn/ui-shared-deps] expand and split (#62364) * [kbn/ui-shared-deps] expand and split * add two import styles for eui/react-dom that are new Co-authored-by: spalger <[email protected]> Co-authored-by: Elastic Machine <[email protected]> * downgrade elasticsearch-browser and updated yarn.lock Co-authored-by: spalger <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
…into event-log/query-support * 'event-log/query-support' of github.com:gmmorris/kibana: (41 commits) [jenkins] refer to sizes in most pipeline code (elastic#62082) skip flaky suite (elastic#60470) [Discover] Fix flaky FT in field visualize (elastic#62418) [ML] Data Frame Analytics: Fix feature importance (elastic#61761) [Reporting] Use a shim for server config (elastic#62086) [Reporting] Fix reporting for non-default spaces (elastic#62226) Fix bug that coerced empty scaled float value to 0 (elastic#62251) [SIEM] [Detection Engine] Remove has manage api keys requireme… (elastic#62446) [Maps] Safely handle empty string and invalid strings from EuiColorPicker (elastic#62507) Reporting/bug more blacklisted headers (elastic#62389) [SIEM] Prevent undefined behavior in our ML popover (elastic#62498) [SIEM] [Detection Engine] remove all unknowns from all rules t… (elastic#62327) base changes for active/current node styling (elastic#62007) [kbn/ui-shared-deps] expand and split (elastic#62364) [ML] DF Analytics - ensure destination index pattern created (elastic#62450) Mark rule run as failure if there was an error (elastic#62383) Add docs for metric explorer alerts (elastic#62314) skip flaky suite (elastic#62281) [SIEM][Detection Engine] Fixes export of single rule and the icons fixes flakiness (elastic#62406) ...
In order to work against #62238, this PR brings the elasticsearch client into the
@kbn/ui-shared-deps
pacakge as it is locked to a specific version and absolutely huge. Since the ui-shared-deps was already large, this also splits the file into two, sticking anything that's in the@elastic
org into a separate chunk, which is loaded in parallel.