-
Notifications
You must be signed in to change notification settings - Fork 20
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
"Version" property in block.json is required for SCSS support #419
Comments
Thanks for you bug report. What's your 10up-toolkit version and are you using |
I'm using |
I was able to fix this by specifying the source file in block.json ( 10up-toolkit/packages/toolkit/utils/blocks.js Lines 48 to 57 in 4c4ba03
@nicholasio I can open a PR if that's cool. My fix would be to treat Sass files the same way that TypeScript files are treated, by expecting the source file to be defined in block.json and adding a transform for the file extension within |
A PR would be welcomed! Thank you |
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: