Optimize @drupal/admin-ui-utilities build process#579
Merged
dawehner merged 10 commits intojsdrupal:masterfrom Apr 15, 2019
Merged
Optimize @drupal/admin-ui-utilities build process#579dawehner merged 10 commits intojsdrupal:masterfrom
dawehner merged 10 commits intojsdrupal:masterfrom
Conversation
Contributor
|
I'm wondering if we should make this change based on the proposal in here: https://www.drupal.org/project/drupal/issues/1030090? |
…ll/drupal-admin-ui into optimize-utilities-build-process
Contributor
|
I'm wondering whether we could move the babel config into the root folder, so its synched with https://github.com/jsdrupal/drupal-admin-ui/blob/master/packages/admin-ui/package.json#L6. |
Contributor
Author
|
@dawehner Is this just for node targets? |
Contributor
That's quite a low number, but maybe that's just me. It feels like supporting similar IE versions as Drupal core seems a good path to follow. |
dawehner
approved these changes
Apr 15, 2019
Contributor
dawehner
left a comment
There was a problem hiding this comment.
Let's get this in, we can worry / change this easy later
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.
Issue
The
@drupal/admin-ui-utilitiespackage is quite large,26.6 KiB.The majority of this bundle size is the regenerator runtime added from
@babel/plugin-transform-runtimeand that our@babel/preset-envconfiguration specifies onlylast 2 versions.Browser list has
last 2 versionsand providing 85.25% global browser coverage.Resolution
Removing
@babel/plugin-transform-runtimeand with it the regenerator runtime reduces the bundle size to a more manageable14.5 KiB. However,last 2 versionsincludes many versions of browsers we probably don't need to care about. Using a more reasonable set of browsers,ios >= 10.3, chrome >= 55, firefox >= 53, safari >= 10.3, ChromeAndroid >= 70, edge >= 15, opera >= 42keeps our coverage at 80.3%.TL;DR
26.6 KiBto14.5 KiBAndroid Browser,Blackberry Browser,IE Mobile,Samsung Internet, andIE 10/11