Skip to content

WPDefinedAsset doesn't implemented for CSS files referenced in block.json #56838

@ericestes

Description

@ericestes

Description

A handy feature of @wordpress/scripts is that it generates filename.asset.php files with automated file versioning for cache busting. However this only seems to work for JavaScript files (both automatically via @wordpress/scripts and manually via adding PHP asset files for CSS files).

Is this correct/intended behavior? Is there a way to get automatic versioning for CSS files?

Step-by-step reproduction instructions

Given a style.css file, an adjacent style.asset.php file, and a "style": "file:./style.css" property in block.json, the php asset file is not honored.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Block APIAPI that allows to express the block paradigm.[Tool] WP Scripts/packages/scripts[Type] BugAn existing feature does not function as intended

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions