Closed tcmulder closed 3 months ago
Actually, consider changing script.js
and style.css
to be view.js
and view.css
. This makes all the work much more attractive. For this to work, aquamin will require WordPress v6.5.0's new viewStyle tag in the block.json
file. I'll then need to double check that editor.css
imports view.css
properly on the front-end.
If all that works, I think it's definitely worth it, as it makes it super clear that these two items are meant for the view (front-end), and things with "editor" in the name are for the back-end.
Further, there's an editorScript option in the block.json
; and, while I don't use it, it's use of "script" would confuse things as they are.
Not sure if it's worthwhile... but it's called viewScript in block.json, and
view.js
makes it feel more like a front-end script, which it is, whilescript.js
feels more generic and could apply to the back or front end.