-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Enables tree shaking in production for plugins #62390
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
Conversation
e24d506 to
8ff2de0
Compare
8ff2de0 to
e22610e
Compare
4bceb75 to
8bd46b1
Compare
895b97d to
3152764
Compare
|
Blocked on #63656 |
85d4e66 to
af271bf
Compare
| */ | ||
| import _ from 'lodash'; | ||
| import mappings from '../../mappings/mappings'; | ||
| import { getIndices } from '../../mappings/mappings'; |
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.
Is tree shaking not applicable to the old import style?
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.
It will include the entire object. In the case of mappings, it was an object containing all the functions which wouldn't be able to be trimmed.
We also disallow default exports.
a19cb37 to
3524c2e
Compare
3f5de8c to
f855331
Compare
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.
This whole file is removed in #65332
Signed-off-by: Tyler Smalley <[email protected]>
💔 Build Failed
Failed CI Steps
Test FailuresKibana Pipeline / kibana-oss-agent / Accessibility Tests.test/accessibility/apps/dashboard·ts.Dashboard dashboardStandard OutStack TraceKibana Pipeline / kibana-oss-agent / Accessibility Tests.test/accessibility/apps/dashboard·ts.Dashboard "after all" hook for "Open flight dashboard"Standard OutStack TraceKibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/context/_context_navigation·js.context app context link in discover "before all" hook for "should go back after loading"Standard OutStack Traceand 20 more failures, only showing the first 3. History
To update your PR or re-run it, just comment with: |
A 20%/2.62 MB reduction in the Javascript assets from the home page and a 53% reduction across all new platform plugins.
Blocked by:
We will need to follow-up with an audit of code paths which are still included, but unused. Some examples of this include the continued use of default exports where often times they return an object. Additionally, anywhere else that imports commonjs code.