Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Conversation

@nerrad
Copy link
Contributor

@nerrad nerrad commented Mar 27, 2020

Just noticed today that we're getting build issues for production builds with the current master checkout and cart blocks.

The issues are when you do a production build of the blocks. On a default WordPress install (latest version of WP, no GB plugin active):

  1. payment methods don't load
  2. the style of the checkout block and cart block is single column (and there are other styles not loading).

The fix for both issues is to account for more sideEffect exclusions. As a result, bundlesizes do jump, this is because the payment-methods demo files weren't being included in production builds, so now that they are included the size jumps.

This will be handled in a followup where payment method integrations will be built to their own bundle (which is what will happen anyways when they are implemented in payment extensions).

@nerrad nerrad self-assigned this Mar 27, 2020
@nerrad nerrad added type: bug The issue/PR concerns a confirmed bug. tools Used for work on build or release tools. labels Mar 27, 2020
@nerrad nerrad added this to the Future Release milestone Mar 27, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Mar 27, 2020

Size Change: +224 kB (9%) 🔍

Total Size: 2.25 MB

Filename Size Change
build/active-filters-frontend.js 7.53 kB +201 B (2%)
build/active-filters.js 8.29 kB +219 B (2%)
build/all-products-frontend.js 17.3 kB +209 B (1%)
build/all-products.js 66.2 kB +226 B (0%)
build/all-reviews-legacy.js 10.8 kB +211 B (1%)
build/all-reviews.js 11 kB +212 B (1%)
build/attribute-filter-frontend.js 17 kB +211 B (1%)
build/attribute-filter.js 11.8 kB +227 B (1%)
build/blocks-legacy.js 2.92 kB -1 B
build/blocks.js 2.92 kB +2 B (0%)
build/cart-frontend.js 158 kB +221 B (0%)
build/cart.js 75 kB +218 B (0%)
build/checkout-frontend.js 270 kB +107 kB (39%) 🚨
build/checkout.js 184 kB +108 kB (58%) 🆘
build/featured-category-legacy.js 146 kB +195 B (0%)
build/featured-category.js 146 kB +196 B (0%)
build/featured-product-legacy.js 59.5 kB +187 B (0%)
build/featured-product.js 59.4 kB +646 B (1%)
build/handpicked-products-legacy.js 7.31 kB +172 B (2%)
build/handpicked-products.js 7.51 kB +173 B (2%)
build/price-filter-frontend.js 14.1 kB +221 B (1%)
build/price-filter.js 10.4 kB +207 B (1%)
build/product-best-sellers-legacy.js 7.41 kB +178 B (2%)
build/product-best-sellers.js 7.62 kB +188 B (2%)
build/product-categories-legacy.js 3.2 kB -1 B
build/product-categories.js 3.19 kB +6 B (0%)
build/product-category-legacy.js 8.32 kB +182 B (2%)
build/product-category.js 8.53 kB +188 B (2%)
build/product-new-legacy.js 7.58 kB +181 B (2%)
build/product-new.js 7.78 kB +185 B (2%)
build/product-on-sale-legacy.js 7.92 kB +180 B (2%)
build/product-on-sale.js 8.18 kB +188 B (2%)
build/product-search-legacy.js 3.64 kB +233 B (6%) 🔍
build/product-search.js 3.86 kB +245 B (6%) 🔍
build/product-tag-legacy.js 6.48 kB +175 B (2%)
build/product-tag.js 6.68 kB +188 B (2%)
build/product-top-rated-legacy.js 7.55 kB +182 B (2%)
build/product-top-rated.js 7.75 kB +185 B (2%)
build/products-by-attribute-legacy.js 8.47 kB +186 B (2%)
build/products-by-attribute.js 8.68 kB +189 B (2%)
build/reviews-by-category-legacy.js 12.7 kB +183 B (1%)
build/reviews-by-category.js 13 kB +190 B (1%)
build/reviews-by-product-legacy.js 14.2 kB +173 B (1%)
build/reviews-by-product.js 14.5 kB +183 B (1%)
build/reviews-frontend-legacy.js 8.4 kB +184 B (2%)
build/reviews-frontend.js 9.09 kB +191 B (2%)
build/style-rtl.css 14.1 kB +406 B (2%)
build/style.css 14 kB +401 B (2%)
build/vendors-legacy.js 280 kB -8 B (0%)
build/vendors-style-legacy.js 108 B -2 B (1%)
build/vendors.js 367 kB -14 B (0%)
ℹ️ View Unchanged
Filename Size Change
build/block-error-boundary-legacy.js 774 B 0 B
build/block-error-boundary.js 774 B 0 B
build/checkbox-control-style-legacy.js 779 B 0 B
build/checkbox-control-style.js 781 B 0 B
build/custom-select-control-style-legacy.js 782 B 0 B
build/custom-select-control-style.js 783 B 0 B
build/editor-legacy-rtl.css 12.6 kB 0 B
build/editor-legacy.css 12.6 kB 0 B
build/editor-rtl.css 13.5 kB 0 B
build/editor.css 13.5 kB 0 B
build/panel-style-legacy.js 773 B 0 B
build/panel-style.js 773 B 0 B
build/snackbar-notice-style-legacy.js 778 B 0 B
build/snackbar-notice-style.js 778 B 0 B
build/spinner-style-legacy.js 772 B 0 B
build/spinner-style.js 772 B 0 B
build/style-legacy-rtl.css 3.68 kB 0 B
build/style-legacy.css 3.68 kB 0 B
build/vendors-style-legacy-rtl.css 1.97 kB 0 B
build/vendors-style-legacy.css 1.97 kB 0 B
build/vendors-style-rtl.css 1.97 kB 0 B
build/vendors-style.css 1.97 kB 0 B
build/vendors-style.js 109 B 0 B
build/wc-blocks-data.js 6.64 kB 0 B
build/wc-blocks-registry.js 1.53 kB 0 B
build/wc-settings.js 2.14 kB 0 B

compressed-size-action

nerrad added 3 commits March 27, 2020 14:07
It looks like when a style is imported on the entrypoint of a component (or in a file with just exports), it get’s treeshaken from the final build _regardless of exception rules_.
@nerrad nerrad marked this pull request as ready for review March 27, 2020 18:54
@nerrad nerrad requested a review from a team as a code owner March 27, 2020 18:54
@nerrad nerrad requested review from mikejolley and senadir and removed request for a team and mikejolley March 27, 2020 18:54
Copy link
Member

@senadir senadir left a comment

Choose a reason for hiding this comment

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

so after a lot of testing, this PR is finally ready to merge, there was a lot of going back and forth in the team channel, this fixes several issues like the skeleton, missing dependencies, broken build and other things, great work here @nerrad

@nerrad nerrad merged commit add0d6a into master Mar 27, 2020
@nerrad nerrad deleted the fix/build-issues branch March 27, 2020 20:56
@nerrad nerrad modified the milestones: Future Release, 2.6.0 Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

tools Used for work on build or release tools. type: bug The issue/PR concerns a confirmed bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants