-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Reconsider server-side block code loading #1097
Copy link
Copy link
Closed
Labels
Gutenberg PluginIssues or PRs related to Gutenberg Plugin management related effortsIssues or PRs related to Gutenberg Plugin management related efforts[Feature] BlocksOverall functionality of blocksOverall functionality of blocks[Status] Needs More InfoFollow-up required in order to be actionable.Follow-up required in order to be actionable.
Metadata
Metadata
Assignees
Labels
Gutenberg PluginIssues or PRs related to Gutenberg Plugin management related effortsIssues or PRs related to Gutenberg Plugin management related efforts[Feature] BlocksOverall functionality of blocksOverall functionality of blocks[Status] Needs More InfoFollow-up required in order to be actionable.Follow-up required in order to be actionable.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Currently we load server-side code for our blocks by requiring each relevant file and registering blocks immediately.
The first part is fine; the second should potentially be done on
initinstead, if only to set an example for block implementers. (We can guarantee thatregister_block_typewill be defined when we call it; other plugins won't be able to, and so should probably wait untilinit.)The initialization was partly done this way in the original PR that added this code, but if we want to do this, then it should probably be done with a single callback for each block instead.