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

Build tooling: Remove support for IE11 #31110

Merged
merged 16 commits into from
Apr 26, 2021
Merged

Build tooling: Remove support for IE11 #31110

merged 16 commits into from
Apr 26, 2021

Conversation

desrosj
Copy link
Contributor

@desrosj desrosj commented Apr 22, 2021

@desrosj desrosj self-assigned this Apr 22, 2021
@github-actions
Copy link

github-actions bot commented Apr 22, 2021

Size Change: -96.1 kB (-6%) ✅

Total Size: 1.39 MB

Filename Size Change
build/a11y/index.js 1.12 kB -24 B (-2%)
build/annotations/index.js 2.93 kB -861 B (-23%) 🎉
build/api-fetch/index.js 2.42 kB -1 kB (-29%) 🎉
build/autop/index.js 2.28 kB -553 B (-20%) 🎉
build/blob/index.js 673 B +8 B (+1%)
build/block-directory/index.js 6.6 kB -2.01 kB (-23%) 🎉
build/block-directory/style-rtl.css 993 B -12 B (-1%)
build/block-directory/style.css 995 B -11 B (-1%)
build/block-editor/index.js 116 kB -15.6 kB (-12%) 👏
build/block-editor/style-rtl.css 13 kB -29 B (0%)
build/block-editor/style.css 13 kB -28 B (0%)
build/block-library/blocks/button/style-rtl.css 501 B -2 B (0%)
build/block-library/blocks/button/style.css 500 B -3 B (-1%)
build/block-library/blocks/columns/style-rtl.css 422 B -14 B (-3%)
build/block-library/blocks/columns/style.css 422 B -13 B (-3%)
build/block-library/blocks/cover/editor-rtl.css 603 B -2 B (0%)
build/block-library/blocks/cover/editor.css 604 B -1 B (0%)
build/block-library/blocks/cover/style-rtl.css 1.22 kB -8 B (-1%)
build/block-library/blocks/cover/style.css 1.22 kB -7 B (-1%)
build/block-library/blocks/file/frontend.js 772 B +7 B (+1%)
build/block-library/blocks/freeform/editor-rtl.css 2.45 kB +4 B (0%)
build/block-library/blocks/freeform/editor.css 2.45 kB +4 B (0%)
build/block-library/blocks/gallery/style-rtl.css 1.06 kB -36 B (-3%)
build/block-library/blocks/gallery/style.css 1.05 kB -35 B (-3%)
build/block-library/blocks/media-text/editor-rtl.css 176 B -15 B (-8%)
build/block-library/blocks/media-text/editor.css 176 B -15 B (-8%)
build/block-library/blocks/media-text/style-rtl.css 492 B -43 B (-8%)
build/block-library/blocks/media-text/style.css 489 B -43 B (-8%)
build/block-library/blocks/navigation-link/style-rtl.css 1.17 kB -6 B (-1%)
build/block-library/blocks/navigation-link/style.css 1.17 kB -7 B (-1%)
build/block-library/blocks/navigation/editor-rtl.css 1.19 kB +3 B (0%)
build/block-library/blocks/navigation/editor.css 1.19 kB +3 B (0%)
build/block-library/blocks/table/style-rtl.css 407 B +5 B (+1%)
build/block-library/blocks/table/style.css 407 B +5 B (+1%)
build/block-library/blocks/video/editor-rtl.css 569 B +1 B (0%)
build/block-library/blocks/video/editor.css 570 B +1 B (0%)
build/block-library/blocks/video/style-rtl.css 169 B -4 B (-2%)
build/block-library/blocks/video/style.css 169 B -4 B (-2%)
build/block-library/editor-rtl.css 9.41 kB -9 B (0%)
build/block-library/editor.css 9.4 kB -12 B (0%)
build/block-library/index.js 142 kB -9.42 kB (-6%)
build/block-library/reset-rtl.css 506 B +4 B (+1%)
build/block-library/reset.css 507 B +4 B (+1%)
build/block-library/style-rtl.css 9.46 kB -95 B (-1%)
build/block-library/style.css 9.46 kB -99 B (-1%)
build/block-serialization-default-parser/index.js 1.3 kB -576 B (-31%) 🎉
build/blocks/index.js 46.6 kB -1.95 kB (-4%)
build/components/index.js 275 kB -12.7 kB (-4%)
build/components/style-rtl.css 16.3 kB -38 B (0%)
build/components/style.css 16.3 kB -41 B (0%)
build/compose/index.js 9.97 kB -1.61 kB (-14%) 👏
build/core-data/index.js 12 kB -5.21 kB (-30%) 🎉
build/customize-widgets/index.js 5.79 kB -2.49 kB (-30%) 🎉
build/data-controls/index.js 826 B -13 B (-2%)
build/data/index.js 7.55 kB -1.65 kB (-18%) 👏
build/date/index.js 31.8 kB -18 B (0%)
build/deprecated/index.js 738 B -49 B (-6%)
build/dom/index.js 4.61 kB -917 B (-17%) 👏
build/edit-navigation/index.js 13.3 kB -3.78 kB (-22%) 🎉
build/edit-navigation/style-rtl.css 2.84 kB -16 B (-1%)
build/edit-navigation/style.css 2.85 kB -16 B (-1%)
build/edit-post/index.js 335 kB -4.48 kB (-1%)
build/edit-post/style-rtl.css 6.95 kB -12 B (0%)
build/edit-post/style.css 6.93 kB -12 B (0%)
build/edit-site/index.js 25.2 kB -3.78 kB (-13%) 👏
build/edit-site/style-rtl.css 4.9 kB +1 B (0%)
build/edit-site/style.css 4.89 kB +2 B (0%)
build/edit-widgets/index.js 13 kB -3.67 kB (-22%) 🎉
build/edit-widgets/style-rtl.css 2.97 kB +1 B (0%)
build/editor/index.js 60.5 kB -5.26 kB (-8%)
build/element/index.js 3.44 kB -1.18 kB (-26%) 🎉
build/escape-html/index.js 739 B +4 B (+1%)
build/format-library/index.js 5.68 kB -1.09 kB (-16%) 👏
build/hooks/index.js 1.76 kB -516 B (-23%) 🎉
build/html-entities/index.js 628 B +5 B (+1%)
build/i18n/index.js 3.73 kB -313 B (-8%)
build/is-shallow-equal/index.js 710 B +12 B (+2%)
build/keyboard-shortcuts/index.js 1.65 kB -888 B (-35%) 🎉
build/keycodes/index.js 1.43 kB -515 B (-26%) 🎉
build/list-reusable-blocks/index.js 2.07 kB -1.12 kB (-35%) 🎉
build/media-utils/index.js 3.08 kB -2.31 kB (-43%) 🎉
build/notices/index.js 1.07 kB -783 B (-42%) 🎉
build/nux/index.js 2.31 kB -1.11 kB (-33%) 🎉
build/nux/style-rtl.css 718 B -13 B (-2%)
build/nux/style.css 716 B -11 B (-2%)
build/plugins/index.js 2 kB -961 B (-32%) 🎉
build/primitives/index.js 1.03 kB -385 B (-27%) 🎉
build/priority-queue/index.js 791 B +1 B (0%)
build/react-i18n/index.js 924 B -529 B (-36%) 🎉
build/redux-routine/index.js 2.82 kB -14 B (0%)
build/reusable-blocks/index.js 2.56 kB -1.27 kB (-33%) 🎉
build/rich-text/index.js 11.7 kB -1.85 kB (-14%) 👏
build/server-side-render/index.js 1.64 kB -967 B (-37%) 🎉
build/shortcode/index.js 1.69 kB -13 B (-1%)
build/token-list/index.js 847 B -422 B (-33%) 🎉
build/url/index.js 1.95 kB -1.06 kB (-35%) 🎉
build/viewport/index.js 1.28 kB -571 B (-31%) 🎉
build/wordcount/index.js 1.24 kB +14 B (+1%)
ℹ️ View Unchanged
Filename Size Change
build/block-library/blocks/archives/editor-rtl.css 61 B 0 B
build/block-library/blocks/archives/editor.css 60 B 0 B
build/block-library/blocks/audio/editor-rtl.css 58 B 0 B
build/block-library/blocks/audio/editor.css 58 B 0 B
build/block-library/blocks/audio/style-rtl.css 112 B 0 B
build/block-library/blocks/audio/style.css 112 B 0 B
build/block-library/blocks/block/editor-rtl.css 161 B 0 B
build/block-library/blocks/block/editor.css 161 B 0 B
build/block-library/blocks/button/editor-rtl.css 475 B 0 B
build/block-library/blocks/button/editor.css 474 B 0 B
build/block-library/blocks/buttons/editor-rtl.css 315 B 0 B
build/block-library/blocks/buttons/editor.css 315 B 0 B
build/block-library/blocks/buttons/style-rtl.css 368 B 0 B
build/block-library/blocks/buttons/style.css 368 B 0 B
build/block-library/blocks/calendar/style-rtl.css 208 B 0 B
build/block-library/blocks/calendar/style.css 208 B 0 B
build/block-library/blocks/categories/editor-rtl.css 84 B 0 B
build/block-library/blocks/categories/editor.css 83 B 0 B
build/block-library/blocks/categories/style-rtl.css 79 B 0 B
build/block-library/blocks/categories/style.css 79 B 0 B
build/block-library/blocks/code/style-rtl.css 90 B 0 B
build/block-library/blocks/code/style.css 90 B 0 B
build/block-library/blocks/columns/editor-rtl.css 190 B 0 B
build/block-library/blocks/columns/editor.css 190 B 0 B
build/block-library/blocks/embed/editor-rtl.css 486 B 0 B
build/block-library/blocks/embed/editor.css 486 B 0 B
build/block-library/blocks/embed/style-rtl.css 401 B 0 B
build/block-library/blocks/embed/style.css 400 B 0 B
build/block-library/blocks/file/editor-rtl.css 301 B 0 B
build/block-library/blocks/file/editor.css 300 B 0 B
build/block-library/blocks/file/style-rtl.css 255 B 0 B
build/block-library/blocks/file/style.css 255 B 0 B
build/block-library/blocks/gallery/editor-rtl.css 704 B 0 B
build/block-library/blocks/gallery/editor.css 705 B 0 B
build/block-library/blocks/group/editor-rtl.css 160 B 0 B
build/block-library/blocks/group/editor.css 160 B 0 B
build/block-library/blocks/group/style-rtl.css 57 B 0 B
build/block-library/blocks/group/style.css 57 B 0 B
build/block-library/blocks/heading/editor-rtl.css 129 B 0 B
build/block-library/blocks/heading/editor.css 129 B 0 B
build/block-library/blocks/heading/style-rtl.css 76 B 0 B
build/block-library/blocks/heading/style.css 76 B 0 B
build/block-library/blocks/html/editor-rtl.css 281 B 0 B
build/block-library/blocks/html/editor.css 281 B 0 B
build/block-library/blocks/image/editor-rtl.css 717 B 0 B
build/block-library/blocks/image/editor.css 716 B 0 B
build/block-library/blocks/image/style-rtl.css 476 B 0 B
build/block-library/blocks/image/style.css 478 B 0 B
build/block-library/blocks/latest-comments/style-rtl.css 281 B 0 B
build/block-library/blocks/latest-comments/style.css 282 B 0 B
build/block-library/blocks/latest-posts/editor-rtl.css 137 B 0 B
build/block-library/blocks/latest-posts/editor.css 137 B 0 B
build/block-library/blocks/latest-posts/style-rtl.css 523 B 0 B
build/block-library/blocks/latest-posts/style.css 522 B 0 B
build/block-library/blocks/legacy-widget/editor-rtl.css 398 B 0 B
build/block-library/blocks/legacy-widget/editor.css 399 B 0 B
build/block-library/blocks/list/style-rtl.css 63 B 0 B
build/block-library/blocks/list/style.css 63 B 0 B
build/block-library/blocks/more/editor-rtl.css 434 B 0 B
build/block-library/blocks/more/editor.css 434 B 0 B
build/block-library/blocks/navigation-link/editor-rtl.css 597 B 0 B
build/block-library/blocks/navigation-link/editor.css 597 B 0 B
build/block-library/blocks/navigation/style-rtl.css 272 B 0 B
build/block-library/blocks/navigation/style.css 271 B 0 B
build/block-library/blocks/nextpage/editor-rtl.css 395 B 0 B
build/block-library/blocks/nextpage/editor.css 395 B 0 B
build/block-library/blocks/page-list/editor-rtl.css 239 B 0 B
build/block-library/blocks/page-list/editor.css 240 B 0 B
build/block-library/blocks/page-list/style-rtl.css 167 B 0 B
build/block-library/blocks/page-list/style.css 167 B 0 B
build/block-library/blocks/paragraph/editor-rtl.css 157 B 0 B
build/block-library/blocks/paragraph/editor.css 157 B 0 B
build/block-library/blocks/paragraph/style-rtl.css 247 B 0 B
build/block-library/blocks/paragraph/style.css 248 B 0 B
build/block-library/blocks/post-author/editor-rtl.css 209 B 0 B
build/block-library/blocks/post-author/editor.css 209 B 0 B
build/block-library/blocks/post-author/style-rtl.css 183 B 0 B
build/block-library/blocks/post-author/style.css 184 B 0 B
build/block-library/blocks/post-comments-form/style-rtl.css 250 B 0 B
build/block-library/blocks/post-comments-form/style.css 250 B 0 B
build/block-library/blocks/post-content/editor-rtl.css 139 B 0 B
build/block-library/blocks/post-content/editor.css 139 B 0 B
build/block-library/blocks/post-excerpt/editor-rtl.css 73 B 0 B
build/block-library/blocks/post-excerpt/editor.css 73 B 0 B
build/block-library/blocks/post-excerpt/style-rtl.css 69 B 0 B
build/block-library/blocks/post-excerpt/style.css 69 B 0 B
build/block-library/blocks/post-featured-image/editor-rtl.css 338 B 0 B
build/block-library/blocks/post-featured-image/editor.css 338 B 0 B
build/block-library/blocks/post-featured-image/style-rtl.css 100 B 0 B
build/block-library/blocks/post-featured-image/style.css 100 B 0 B
build/block-library/blocks/post-title/style-rtl.css 60 B 0 B
build/block-library/blocks/post-title/style.css 60 B 0 B
build/block-library/blocks/preformatted/style-rtl.css 103 B 0 B
build/block-library/blocks/preformatted/style.css 103 B 0 B
build/block-library/blocks/pullquote/editor-rtl.css 183 B 0 B
build/block-library/blocks/pullquote/editor.css 183 B 0 B
build/block-library/blocks/pullquote/style-rtl.css 318 B 0 B
build/block-library/blocks/pullquote/style.css 318 B 0 B
build/block-library/blocks/query-loop/editor-rtl.css 83 B 0 B
build/block-library/blocks/query-loop/editor.css 82 B 0 B
build/block-library/blocks/query-loop/style-rtl.css 315 B 0 B
build/block-library/blocks/query-loop/style.css 317 B 0 B
build/block-library/blocks/query-pagination-numbers/editor-rtl.css 122 B 0 B
build/block-library/blocks/query-pagination-numbers/editor.css 121 B 0 B
build/block-library/blocks/query-pagination/editor-rtl.css 270 B 0 B
build/block-library/blocks/query-pagination/editor.css 262 B 0 B
build/block-library/blocks/query-pagination/style-rtl.css 168 B 0 B
build/block-library/blocks/query-pagination/style.css 168 B 0 B
build/block-library/blocks/query-title/editor-rtl.css 86 B 0 B
build/block-library/blocks/query-title/editor.css 86 B 0 B
build/block-library/blocks/query/editor-rtl.css 131 B 0 B
build/block-library/blocks/query/editor.css 132 B 0 B
build/block-library/blocks/quote/style-rtl.css 169 B 0 B
build/block-library/blocks/quote/style.css 169 B 0 B
build/block-library/blocks/rss/editor-rtl.css 201 B 0 B
build/block-library/blocks/rss/editor.css 202 B 0 B
build/block-library/blocks/rss/style-rtl.css 290 B 0 B
build/block-library/blocks/rss/style.css 290 B 0 B
build/block-library/blocks/search/editor-rtl.css 189 B 0 B
build/block-library/blocks/search/editor.css 189 B 0 B
build/block-library/blocks/search/style-rtl.css 359 B 0 B
build/block-library/blocks/search/style.css 362 B 0 B
build/block-library/blocks/separator/editor-rtl.css 99 B 0 B
build/block-library/blocks/separator/editor.css 99 B 0 B
build/block-library/blocks/separator/style-rtl.css 251 B 0 B
build/block-library/blocks/separator/style.css 251 B 0 B
build/block-library/blocks/shortcode/editor-rtl.css 512 B 0 B
build/block-library/blocks/shortcode/editor.css 512 B 0 B
build/block-library/blocks/site-logo/editor-rtl.css 440 B 0 B
build/block-library/blocks/site-logo/editor.css 441 B 0 B
build/block-library/blocks/site-logo/style-rtl.css 154 B 0 B
build/block-library/blocks/site-logo/style.css 154 B 0 B
build/block-library/blocks/social-link/editor-rtl.css 164 B 0 B
build/block-library/blocks/social-link/editor.css 165 B 0 B
build/block-library/blocks/social-links/editor-rtl.css 796 B 0 B
build/block-library/blocks/social-links/editor.css 795 B 0 B
build/block-library/blocks/social-links/style-rtl.css 1.32 kB 0 B
build/block-library/blocks/social-links/style.css 1.33 kB 0 B
build/block-library/blocks/spacer/editor-rtl.css 308 B 0 B
build/block-library/blocks/spacer/editor.css 308 B 0 B
build/block-library/blocks/spacer/style-rtl.css 48 B 0 B
build/block-library/blocks/spacer/style.css 48 B 0 B
build/block-library/blocks/table/editor-rtl.css 478 B 0 B
build/block-library/blocks/table/editor.css 478 B 0 B
build/block-library/blocks/tag-cloud/editor-rtl.css 118 B 0 B
build/block-library/blocks/tag-cloud/editor.css 118 B 0 B
build/block-library/blocks/tag-cloud/style-rtl.css 94 B 0 B
build/block-library/blocks/tag-cloud/style.css 94 B 0 B
build/block-library/blocks/template-part/editor-rtl.css 552 B 0 B
build/block-library/blocks/template-part/editor.css 551 B 0 B
build/block-library/blocks/term-description/editor-rtl.css 90 B 0 B
build/block-library/blocks/term-description/editor.css 90 B 0 B
build/block-library/blocks/text-columns/editor-rtl.css 95 B 0 B
build/block-library/blocks/text-columns/editor.css 95 B 0 B
build/block-library/blocks/text-columns/style-rtl.css 166 B 0 B
build/block-library/blocks/text-columns/style.css 166 B 0 B
build/block-library/blocks/verse/style-rtl.css 87 B 0 B
build/block-library/blocks/verse/style.css 87 B 0 B
build/block-library/common-rtl.css 1.31 kB 0 B
build/block-library/common.css 1.31 kB 0 B
build/block-library/theme-rtl.css 692 B 0 B
build/block-library/theme.css 693 B 0 B
build/block-serialization-spec-parser/index.js 3.06 kB 0 B
build/customize-widgets/style-rtl.css 666 B 0 B
build/customize-widgets/style.css 667 B 0 B
build/dom-ready/index.js 577 B 0 B
build/edit-post/classic-rtl.css 454 B 0 B
build/edit-post/classic.css 454 B 0 B
build/edit-widgets/style.css 2.98 kB 0 B
build/editor/style-rtl.css 3.9 kB 0 B
build/editor/style.css 3.9 kB 0 B
build/format-library/style-rtl.css 637 B 0 B
build/format-library/style.css 639 B 0 B
build/list-reusable-blocks/style-rtl.css 629 B 0 B
build/list-reusable-blocks/style.css 628 B 0 B
build/reusable-blocks/style-rtl.css 225 B 0 B
build/reusable-blocks/style.css 225 B 0 B
build/warning/index.js 1.14 kB 0 B

compressed-size-action

@talldan
Copy link
Contributor

talldan commented Apr 23, 2021

Note: This change will only affect WordPress and it’s built-in features. For your site visitors, any plugin or theme you may be using, which was made with support for IE11 in mind, should still look and feel as if nothing changed.

I'm just wondering whether this statement includes the default front-end block styles that Gutenberg/Core provides?

If a theme is using those styles this change may affect a site's appearance for visitors.

@youknowriad
Copy link
Contributor

Apparently the issues here seem to be related to webpack not understanding some ESnext syntax (since now it's not being transpiled). By looking on the internet, it seems to be something that is generally fixed by upgrading webpack. Any news about webpack 5 upgrade cc @gziolo @jsnajdr

Also, if you have any idea about how we could solve this without upgrade :)

@gziolo
Copy link
Member

gziolo commented Apr 23, 2021

It looks like webpack doesn't understand ?? operator.

@gziolo
Copy link
Member

gziolo commented Apr 23, 2021

Any news about webpack 5 upgrade

The challenge is that we will have to upgrade webpack from v4 to v5 in both Gutenberg and WordPress core because they both use the same code from build-module.

@gziolo gziolo added the [Type] Build Tooling Issues or PRs related to build tooling label Apr 23, 2021
@gziolo gziolo changed the title Remove support for IE11 Build tooling: Remove support for IE11 Apr 23, 2021
@gziolo gziolo added [Package] Browserslist config /packages/browserslist-config [Type] Breaking Change For PRs that introduce a change that will break existing functionality labels Apr 23, 2021
@gziolo
Copy link
Member

gziolo commented Apr 23, 2021

I'm testing whether enforcing transpilation of ?? could help by passing the flag to @babel/preset-env configuration:

include: [ 'proposal-nullish-coalescing-operator' ],

@jsnajdr
Copy link
Member

jsnajdr commented Apr 23, 2021

The issue is that webpack uses the acorn parser, which is very conservative about supporting syntax that's not 100% stable and standardized.

I'm afraid we'll need to transpile optional chaining until the webpack 5 upgrade is done. @scinos Do you have any interesting knowledge to share here? I think you have direct on-hands experience from solving exactly the same issue in Calypso.

@gziolo
Copy link
Member

gziolo commented Apr 23, 2021

I'm testing whether enforcing transpilation of ?? could help by passing the flag to @babel/preset-env configuration:

include: [ 'proposal-nullish-coalescing-operator' ],

It looks like this is the way to go. There is one failing unit test but it's expected since Babel generates now a bit different output. We only need to regenerate the snapshot produced.

@gziolo
Copy link
Member

gziolo commented Apr 23, 2021

Another issue to resolve, but an expected one:
https://github.com/WordPress/gutenberg/pull/31110/checks?check_run_id=2418311313

Screen Shot 2021-04-23 at 11 33 40

There are two ways we can approach it:

  1. We remove the check as we don't care anymore.
  2. We enforce IE11 for the code but only in build folders for individual packages and validate there. The question is what build really is in this world. Maye we can stop publishing it from now on. If we set Node 12 as the minimal version, it should work with Node out of the box with import statements. We can start using exports in package.json as detailed in https://nodejs.org/api/packages.html#packages_package_entry_points.

@gziolo
Copy link
Member

gziolo commented Apr 23, 2021

E2e tests also fail, so there are most likely more features missing in Chromium that's used there. We have fairly outdated version of Chromium, so we can try to upgrade puppeteer-core to the latest version v9.0.0 from v5.5.0 and see if that helps.

@youknowriad
Copy link
Contributor

@gziolo we should remove that check.

@youknowriad
Copy link
Contributor

@gziolo I went ahead and opened this PR to upgrade puppeteer to see what impacts it has on its own #31138

@youknowriad
Copy link
Contributor

There are 3 or 4 failing tests with the puppeteer upgrade (without the browserlist change), I could use some help debugging these.

@desrosj
Copy link
Contributor Author

desrosj commented Apr 23, 2021

Thanks everyone for working through this!

I'm just wondering whether this statement includes the default front-end block styles that Gutenberg/Core provides?

If a theme is using those styles this change may affect a site's appearance for visitors.

@talldan When @Clorith reviewed the post, he did flag this. It is a good question that we need to discuss. I think there are a few paths we could take here:

  • Over-communicate this through dev notes and Make Core posts so that site owners can make the adjustments they need to if supporting IE11 is important to their user base.
  • Create a plugin that includes IE11 styles for the blocks in Core as of 5.7. New blocks will not receive styles.
  • Continue bundling front end styles only for IE11.

I think proceeding with the first option for now is best, and we can explore the others if there is enough of a need that presents itself. But if anyone has other ideas or thoughts, please do share!

@gziolo
Copy link
Member

gziolo commented Apr 26, 2021

There are still test failures:

["ReferenceError: Cannot access 'v' before initialization
3161
at Object.axis (http://localhost:8889/wp-content/plugins/gutenberg/build/components/index.js?ver=e3b9da069e5f62ac7f1c03c61682c261:661:20741)
3162
at http://localhost:8889/wp-content/plugins/gutenberg/build/components/index.js?ver=e3b9da069e5f62ac7f1c03c61682c261:661:21511

There is no such thing as Object.axis in the codebase so this is some sort of bug that gets introduced during Babel transpilation. It needs further debugging.

@youknowriad
Copy link
Contributor

I've fixed the issue, it was actually a valid bug that was "fixed"/"hidden" by the transpiration of let/const

@youknowriad
Copy link
Contributor

It seems like we're good to do, e2e tests are passing.

@youknowriad
Copy link
Contributor

Should we document this change somewhere? The changelog of the presets package maybe?

@youknowriad youknowriad marked this pull request as ready for review April 26, 2021 10:56
Copy link
Member

@aristath aristath left a comment

Choose a reason for hiding this comment

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

Confirmed it all looks good here 👍

@gziolo gziolo added the [Package] Babel preset /packages/babel-preset-default label Apr 26, 2021
@gziolo
Copy link
Member

gziolo commented Apr 26, 2021

Should we document this change somewhere? The changelog of the presets package maybe?

In most of the packages we have the following note:

This package assumes that your code will run in an ES2015+ environment. If you're using an environment that has limited or no support for ES2015+ such as lower versions of IE then using core-js or @babel/polyfill will add support for these methods. Learn more about it in Babel docs.

It's no longer valid with the changes introduced. I don't think we should consider it a blocker, but we should discuss a path moving forward separately. We still have nearly two weeks before all these changes get published to npm. I only mentioned it earlier, but we need also to think if we want to keep both build-module and build, because we could as well set the minimum version required of Node to v12 and it should all work with a single build target build-module. Unless we want to keep build that contains ES5 code as before this PR.

@desrosj
Copy link
Contributor Author

desrosj commented Apr 26, 2021

Thanks everyone!

@desrosj desrosj merged commit a542c0d into trunk Apr 26, 2021
@desrosj desrosj deleted the update/browserslist branch April 26, 2021 14:02
@github-actions github-actions bot added this to the Gutenberg 10.6 milestone Apr 26, 2021
@desrosj
Copy link
Contributor Author

desrosj commented Apr 26, 2021

For cross referencing, here are some relevant Trac tickets:

  • Ticket to discuss when Core should stop loading IE11 polyfills by default: Trac-53078.
  • Ticket dropping IE11 support in Core SVN: Trac-53077.

@gziolo
Copy link
Member

gziolo commented Apr 28, 2021

I opened a follow-up #31270 that documents the changes applied for the consumers of WordPress packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Babel preset /packages/babel-preset-default [Package] Browserslist config /packages/browserslist-config [Type] Breaking Change For PRs that introduce a change that will break existing functionality [Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants