Enables tree shaking in production for plugins #62390
Closed
tylersmalley wants to merge 1 commit intoelastic:mainfrom
Closed
Enables tree shaking in production for plugins #62390tylersmalley wants to merge 1 commit intoelastic:mainfrom
tylersmalley wants to merge 1 commit intoelastic:mainfrom
Conversation
e24d506 to
8ff2de0
Compare
tylersmalley
commented
Apr 3, 2020
tylersmalley
commented
Apr 3, 2020
mistic
reviewed
Apr 4, 2020
8ff2de0 to
e22610e
Compare
4bceb75 to
8bd46b1
Compare
895b97d to
3152764
Compare
This was referenced Apr 18, 2020
Member
Author
|
Blocked on #63656 |
85d4e66 to
af271bf
Compare
mshustov
reviewed
May 4, 2020
| */ | ||
| import _ from 'lodash'; | ||
| import mappings from '../../mappings/mappings'; | ||
| import { getIndices } from '../../mappings/mappings'; |
Contributor
There was a problem hiding this comment.
Is tree shaking not applicable to the old import style?
Member
Author
There was a problem hiding this comment.
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
tylersmalley
commented
May 5, 2020
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Contributor
💔 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: |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.