admin管理员组文章数量:1122846
I've been struggling with this for hours. I used the @wordpress/create-block package to generate a template for me to create my first block. I've managed to create a hero block with an image uploader etc.
However, now I've come to the point where I need to actually add JS to the frontend in order to make the image carousel functionality. For some reason unknown to me, my view.js
file absolutely refuses to load up in the frontend.
With loading I mean doesn't appear in HTML, and doesn't show up in the network tab.
I've searched everywhere.
- According to the docs it's correctly defined in my blocks.json.
- I'm not using a
render_callback
in myregister_block_type
, so I shouldn't have to enqueue it myself manually. - I've removed and reinserted the block about 100 times thinking it was cache or whatever.
It's just no use. The plugin directory for my custom block is right here: if you have a moment I'd very much appreciate any help in order to get this resolved.
Thank you!
本文标签: phpCustom gutenberg block refuses to load viewScript and I don39t know why
版权声明:本文标题:php - Custom gutenberg block refuses to load viewScript and I don't know why 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736308688a1933752.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论