Describe the bug
When running 10uptoolkit build or 10uptoolkit watch, if the key for an entry doesn't contain the string block then crucial block assets aren't generated. Instead of generating dist/blocks/blockname/editor.css, a file is created in dist/css with the entry key as the filename.
I expect that regardless of what the key is named, if the entry point path contains the block directory as set in paths.config.js then the appropriate assets are generated.
If the current behavior is intended, this should be documented clearly in the package readme.
Steps to Reproduce
- Create a basic block
example in a project using 10up-toolkit that imports a CSS file in block/index.js
- In
package.json, create an entry for your new block, making sure not to include the string block in the entry key
- Run
10uptoolkit build or 10uptoolkit watch
- Observe that the contents of the previously imported CSS file are now in
dist/css/example.css instead of dist/blocks/example/editor.css
Screenshots, screen recording, code snippet
Example entry
"image-carousel": "./includes/blocks/image-carousel/index.js",
Environment information
Using 10up-toolkit v4.3.1
WordPress information
No response
Code of Conduct