Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ericestes opened this issue Dec 6, 2023 · 0 comments
Open
Labels
[Feature] Block API API that allows to express the block paradigm. [Tool] WP Scripts /packages/scripts [Type] Bug An existing feature does not function as intended

Comments

@ericestes
Copy link

ericestes commented Dec 6, 2023

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

@ericestes ericestes added the [Type] Bug An existing feature does not function as intended label Dec 6, 2023
@skorasaurus skorasaurus added [Tool] WP Scripts /packages/scripts [Type] Question Questions about the design or development of the editor. labels Dec 7, 2023
@gziolo gziolo added the [Feature] Block API API that allows to express the block paradigm. label Jan 18, 2024
@gziolo gziolo removed the [Type] Question Questions about the design or development of the editor. label Mar 7, 2024
@gziolo gziolo changed the title WPDefinedAsset doesn't work for CSS files in block.json? WPDefinedAsset doesn't implemented for CSS files referenced in block.json Mar 7, 2024
@gziolo gziolo mentioned this issue Mar 7, 2024
69 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block API API that allows to express the block paradigm. [Tool] WP Scripts /packages/scripts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants