Skip to content

Importing core data store on front-end brings in the entire @wordpress/block-editor module #67334

@samueljseay

Description

@samueljseay

Recently on WooCommerce we decided to explore using entities to share some data between blocks. The data is some editable block headings we want to share between blocks.

To access this data in front-end we use the core data store, specifically we use getEditedEntityRecord. The issue with doing this, is that @wordpress/core-data depends on @wordpress/block-editor so when we do this basic query of some entity records front-end we're forced to load the entirety of the block editor.

It seems this dependency is only for unlocking a private API. The only other usage is in a test file.

I'm not sure what a good fix to this would be, but it would be hugely helpful if we could avoid depending on @wordpress/block-editor for this package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Package] Core data/packages/core-data[Status] DuplicateUsed to indicate that a current issue matches an existing one and can be closed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions