I have seen posts about this from the past, but it is becoming a pain point for me.
Sometimes when exporting blocks, the JS file is not properly formatted. This can break blocks and require recovery, and makes them appear unavailable in the block editor.
Typically the fix is to open the theme in Cursor and format it properly, but this leads to the “file edited outside of Pinegrow” issue. I have also tried editing the code directly inside of Pinegrow. In either case, if I ever need to export the block again, the formatting issues return and I must manually reformat the file again.
It would be great if Pinegrow had some built in beautification that can fix formatting issues automatically, or even if we could use the AI assistant to fix the formatting during the export process. As a side note, Pinegrow does have the option to right click and format files for some code types, but it is difficult to click and doesn’t resolve these issues anyway.
In particular, using Alpine.js seems to cause issues (I’ve worked around these by removing shorthand syntax), as well as block attributes with a lot of properties, but it does occasionally happen even without these variables.