[wp-trac] [WordPress Trac] #53565: Split packages and blocks into separate Weback configs

WordPress Trac noreply at wordpress.org
Wed Jun 30 18:59:45 UTC 2021


#53565: Split packages and blocks into separate Weback configs
------------------------------+----------------------------
 Reporter:  desrosj           |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Future Release
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:  has-patch
  Focuses:                    |
------------------------------+----------------------------
 This was originally attempted in [51259] on #53397, but there were some
 issues that warranted a revert before packaging 5.8 RC1 (see [51268]).

 [https://github.com/WordPress/wordpress-develop/pull/1412 WordPress
 /wordpress-develop-1412] was used to build the patch applied in [51259].
 From @gziolo on that PR:

 > We need to add handling for JavaScript files that are going to be used
 with blocks on the frontend. They don't work quite well with the current
 setup for entry points created for packages because of reasons like
 >
 > - the output path is different
 > - frontend scripts should not be exposed under wp globals
 >
 > In general, it looks like the split is a good strategy because it nicely
 separates two independents parts: packages and blocks. There isn't that
 much overlap between configs anyway.

 After committing, the following notice was seen in Core when visiting a
 page with a `core/file` block:

 `Notice: register_block_script_handle was called incorrectly. The asset
 file for the "viewScript" defined in "core/file" block definition is
 missing. Please see Debugging in WordPress for more information. (This
 message was added in version 5.5.0.) in /var/www/src/wp-
 includes/functions.php on line 5535`

 An attempt was made to fix this in [51267]. This appeared to fix the issue
 when visiting the site. However, [https://github.com/WordPress/wordpress-
 develop/runs/2948059468?check_suite_focus=true#step:20:27 automated tests
 still displayed the notice], and it
 [https://wordpress.slack.com/archives/C02RQBWTW/p1625009868478000 caused
 failures in some environments]. This was also reverted.

 [https://github.com/WordPress/gutenberg/pull/33082 Gutenberg-33082] was
 opened as a follow up to the attempted fix, but after looking further, the
 lines being changed may have an intentional reason to be how they are.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53565>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list