@@RyanWelcherCodes ... don't! Not only does it humanize you, it already gives the viewer great gotcha moments and will probably make these situations less scary if they (we) hit them.
Thanks Ryan. This is exactly what I was looking for a few months ago when I started with Gutenberg development. I tried to extend webpack config but got stuck on the part with the entry points lookup. The way that I solved it is by adding a block.json file inside the folder and specifying the script file path inside of it, a small hack I suppose. Here is the idea for your next video: very often developers need to rely on a third-party library like swiper slider for example. What is the best approach to conditionally enqueue it without bundling it inside multiple blocks?
Thanks for this explaining. This was very helpful. One small suggestion, do not close directories immediately while checking files in vs code sidebar. I get it that it your habit, but to us viewers it help a lot just to leave folders open so we can easily compare it with our project :)
This method enqueues ALL block styles/scripts on page even when only one block is used. Is there a way to conditional render each style/script per block?
Hey Ryan, thanks for the great content! I’ve been following along and trying to implement PostCSS autoprefixing. Any chance you have or plan to do a video on setting something like this up?
@@RyanWelcherCodes sorry I didn’t realise that you had replied! I am using @wordpress/scripts, but none on my css has prefixes. Is there a particular setting I need to enable for this? Thank man!
Awesome. WP Community gets awesome tricks from you.
Thank you for leaving in the obstacles and woes you faced.
Always helps.
Thanks for the comment! My imposter syndrome always screams "edit that out" ;)
@@RyanWelcherCodes ... don't!
Not only does it humanize you, it already gives the viewer great gotcha moments and will probably make these situations less scary if they (we) hit them.
Agreed!
Ryan, thank you so much for sharing this!
I was just wrestling with this issue and then it occurred to me that maybe you covered this topic, and you had. Saved the day - thank you!!
Great work Ryan and thanks. This is extremely helpful.
Thanks Ryan. This is exactly what I was looking for a few months ago when I started with Gutenberg development. I tried to extend webpack config but got stuck on the part with the entry points lookup. The way that I solved it is by adding a block.json file inside the folder and specifying the script file path inside of it, a small hack I suppose. Here is the idea for your next video: very often developers need to rely on a third-party library like swiper slider for example. What is the best approach to conditionally enqueue it without bundling it inside multiple blocks?
Thanks for this explaining. This was very helpful.
One small suggestion, do not close directories immediately while checking files in vs code sidebar.
I get it that it your habit, but to us viewers it help a lot just to leave folders open so we can easily compare it with our project :)
This method enqueues ALL block styles/scripts on page even when only one block is used. Is there a way to conditional render each style/script per block?
Hey Ryan, thanks for the great content! I’ve been following along and trying to implement PostCSS autoprefixing. Any chance you have or plan to do a video on setting something like this up?
If you're using the @wordpress/scripts package, then you already have support for PostCSS and autoprefixer. It should just work!
@@RyanWelcherCodes sorry I didn’t realise that you had replied! I am using @wordpress/scripts, but none on my css has prefixes. Is there a particular setting I need to enable for this? Thank man!
I am testing now, and in the dynamic block i don't needed to enqueue the view script to work...
@9:09 I HAVE to add a webpack.config? sigh
I think the twitch-pre-publish-checklist repo is the only way to avoid the issue I'm refferring to.
How to read Gutenberg Block Attributes in ViewScript code?