Closed senadir closed 2 years ago
Related: #4725 & #4928
Just a few thoughts:
the WooCommerce Blocks dependency that is fetches still contains build files, which lead to a bigger file size and The WooCommerce Blocks dependency should only contain production and not build files and folders.
@senadir will you clarify the terminology in the description and edit "build" to "source"? I'm pretty sure you meant source files (or files used for building) but a first read-through caused me to trip up a bit because I read it as "built".
@niels can you clarify if this issue has been addressed elsewhere - I see a number of linked relevant issues in various places and it's not clear to me whether any of them fix this.
Since I'm not sure if this has been fixed or not based on conversations I've seen in Slack (p1637754359333600-slack-C8X6Q7XQU) and elsewhere, my next suggestion might no longer be relevant. But one approach you could take to fixing this for Woo Core distributions is to implement a post install in the WooCommerce repository that deletes the source files after the package is installed.
the WooCommerce Blocks dependency that is fetches still contains build files, which lead to a bigger file size and The WooCommerce Blocks dependency should only contain production and not build files and folders.
@senadir will you clarify the terminology in the description and edit "build" to "source"? I'm pretty sure you meant source files (or files used for building) but a first read-through caused me to trip up a bit because I read it as "built".
I'm not sure if I was the one who wrote that, but still, I meant source files, not build files, updated.
But one approach you could take to fixing this for Woo Core distributions is to implement a post install in the WooCommerce repository that deletes the source files after the package is installed.
If we're to remove them here before they're pushed, that would be great, but using postinstall
is also a solution.
I was actually having a déjà vu, Darren and I had this same exact convo a year ago, I'm not sure if anything changed from composer side, so it's worth another try.
p1599750092174900-slack-C8X6Q7XQU
@niels can you clarify if this issue has been addressed elsewhere - I see a number of linked relevant issues in various places and it's not clear to me whether any of them fix this.
Since I'm not sure if this has been fixed or not based on conversations I've seen in Slack (p1637754359333600-slack-C8X6Q7XQU) and elsewhere, my next suggestion might no longer be relevant. But one approach you could take to fixing this for Woo Core distributions is to implement a post install in the WooCommerce repository that deletes the source files after the package is installed.
I marked two issues as related:
npm run package-plugin:deploy
. My fix #4928 might have solved the problem that our plugin contains obsolete files and being merged into the WooCommerce core. My fix should be shipping with WooCommerce Blocks 6.5.0 and should land in WooCommerce 6.1. I suggest checking if this problem still exists with WooCommerce 6.1.This issue has been marked as stale
because it has not seen any activity within the past 60 days. Our team uses this tool to help surface issues for review. If you are the author of the issue there's no need to comment as it will be looked at.
This issue has been marked as stale
because it has not seen any activity within the past 60 days. Our team uses this tool to help surface issues for review. If you are the author of the issue there's no need to comment as it will be looked at.
It seems like https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4418 didn't work well in composer builds. WooCommerce still ships with source files, making the block package be +4mb of the 9.6mb zip file instead of 2.2mb.
pcShBQ-82-p2
Additional context
Approximately once a month (Pca54o-1N-p2), the latest version of WooCommerce Blocks gets integrated into WooCommerce. The WooCommerce Blocks dependency that WooCommerce is fetching, is currently 12.9mb big, while the WooCommerce Blocks plugin on w.org has a size of 2.2mb. The WooCommerce Blocks dependency that is fetches still contains source files, which lead to a bigger file size. This then leads to a bigger overall file size of the WooCommerce plugin.
Steps to reproduce
woocommerce/packages/woocommerce-blocks
.assets
,packages
,patches
andglobal.d.ts
.Expected result
The WooCommerce Blocks dependency should only contain production and not build files and folders.