This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
Remove the dependency on block-editor
from frontend blocks
#8071
Labels
focus: performance
The issue/PR is related to performance.
priority: high
The issue/PR is high priority—it affects lots of customers substantially, but not critically.
type: dependencies
Pull requests that update a dependency file (used by renovate).
Problem statement
As described in this PR, there are three hooks:
useBorderProps
useColorProps
useSpacingProps
with the dependency on
@wordpress/block-editor
that has implicit dependency on@wordpress/components
. That should be avoided on the frontend, otherwise those dependencies are externalised and loaded on the pages that use blocks with that dependency (+200kBcomponents.min.js
and +170kBeditor-block.min.js
).Solution
Remove the dependency on the hooks from the frontend code.
Goal
Improve the performance, by decreasing the file transfer on the pages using blocks with those dependencies
pdToLP-fF-p2
The text was updated successfully, but these errors were encountered: