view.js / viewScript (Frontend JS)

This doesn’t exist until 5.9, it is not accounted for in any of our prototypes.

Block type frontend scripts definition. They will be enqueued only when viewing the content on the front of the site.

If your block does not need JS, view.js can be deleted and viewScript removed from block.json.

See