Update: This video is a little out of date. The code will still work, but the @wordpress/scripts package now supports multiple blocks by default. Check out this video for more • Customizing your @wordpress/scripts b...
We use the @wordpress/create-blocks package to scaffold a plugin that contains a single custom block. Then we modify the setup to be able to have multiple blocks.
Highights:
3:17 -14:35 Used the @wordpress/create-block package to scaffold a new plugin with a single block.
14:36 - 36:25 Restructured the plugin to allow for registering multiple blocks.
36:26 - 43:51 Added a custom webpack.config.js to set up one entry point per block.
44:00 Demo'd a custom template that uses the same structure: npx @wordpress/create-block --template @ryanwelcher/multiple-blocks-template.
Template url: https://www.npmjs.com/package/@ryanwe...
Repository for all my streams: https://github.com/ryanwelcher/twitch
Watch video Creating a plugin with @wordpress/create-blocks that has multiple blocks online without registration, duration hours minute second in high quality. This video was added by user Ryan Welcher Codes 07 October 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 6,362 once and liked it 137 people.