You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce a new Grunt task (copy:block-json) that scans and converts core block.json files to PHP arrays and stores them in a single blocks-json.php at build time.
Use the new blocks-json.php file in the register_block_type_from_metadata() function.
Assign the block registration data to a static variable (cache) so that it’s only loaded once per request.
My understanding from that comment is that it's not yet available for custom blocks — only for core blocks.
But maybe we could have a similar build task in project base to get the same performance boost and limit unnecessary file loading.
The text was updated successfully, but these errors were encountered:
This is really interesting @pierre-dekode. WP 6.7 introduces wp_register_block_metadata_collection() for bulk registering a collection of blocks from a manifest file. Let's implement this in T2 for WP 6.7+
Can you open a issue in T2 for this and close this issue seeing as there are no blocks in Project Base?
Just an idea!
Core just landed (in 6.1) a
copy:block-json
Grunt task to:My understanding from that comment is that it's not yet available for custom blocks — only for core blocks.
But maybe we could have a similar build task in project base to get the same performance boost and limit unnecessary file loading.
The text was updated successfully, but these errors were encountered: