You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here I came up with a very strange bug, which caused me today a lot of trouble and couple hours. The problem is that, when "version" property is not defined in block.json, the style and editorStyle properties, when defined like that
Are not finding properly the CSS files when bundled from SASS and ending up with an error, despite the fact that style.css and editor.css has been created properly, however based on the source in the error, it's looking in the wrong place (not in dist).
ERROR in ENOENT: no such file or directory, open '.../includes/blocks/accordion/style.css
When you add a version property to the block.json everything works properly.
The problem is that version property is optional as Wordpress documentation states, neither I have found in your documentation strictly that version property is required (it exist in examples though)
Steps to Reproduce
Create a simple WP Block with block.json
Create styles.scss and add the property style with style.css to the block.json
I'm using 6.2.1 and yes, using useBlockAssets flag together with "useBlockModules and useScriptModules. I haven't tested how it behaves without using these flags
Describe the bug
Here I came up with a very strange bug, which caused me today a lot of trouble and couple hours. The problem is that, when "version" property is not defined in block.json, the
style
andeditorStyle
properties, when defined like thatAre not finding properly the CSS files when bundled from SASS and ending up with an error, despite the fact that style.css and editor.css has been created properly, however based on the source in the error, it's looking in the wrong place (not in dist).
ERROR in ENOENT: no such file or directory, open '.../includes/blocks/accordion/style.css
When you add a
version
property to theblock.json
everything works properly.The problem is that
version
property is optional as Wordpress documentation states, neither I have found in your documentation strictly thatversion
property is required (it exist in examples though)Steps to Reproduce
block.json
styles.scss
and add the property style with style.css to theblock.json
version
property.Screenshots, screen recording, code snippet
Environment information
N/A
WordPress information
N/A
Code of Conduct
The text was updated successfully, but these errors were encountered: