Block metadata viewScriptModule field in 6.5

The Block API now recognizes the viewScriptModule field in block.json metadata. This provides an experience for script modules that’s analogous to what scripts and the viewScript field currently provide. The script module declared in viewScriptModule will be enqueued when a block is rendered for viewing on the frontend.

This post was originally published on Make Core by Jon Surrell.

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.