Skip to content
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

Tiled gallery block: add babel-polyfill #31228

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions client/gutenberg/extensions/tiled-gallery/editor.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* External dependencies
*/
import '@babel/polyfill';

/**
* Internal dependencies
*/
Expand Down
5 changes: 5 additions & 0 deletions client/gutenberg/extensions/tiled-gallery/view.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* External dependencies
*/
import '@babel/polyfill';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to compare the size change for the view script with this addition.

If we depend on wp-polyfill we can share the cost of the dependency with any other code that may be using it.

I'd like to consider that before moving ahead with this.

Copy link
Member Author

@simison simison Mar 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wp-polyfill (v7.0.0) 30.7 KB minified

view.js when building minified production versions:

  • without polyfill 7.96 KiB
  • with polyfill 87.6 KiB

So looks like we're better enqueing wp-polyfill as an immediate fix and then later on we'll fix the builder.

Copy link
Member Author

@simison simison Mar 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So looks like we're better enqueing wp-polyfill as an immediate fix

Automattic/jetpack#11487


/**
* Internal dependencies
*/
Expand Down