This WordPress plugin is intended for use as a block registration plugin. By building and compiling blocks through this plugin, and not in the Theme, you can ensure that the blocks remain available if you choose to switch to another Theme.
- Install this as a plugin in your local WordPress installation.
- Run
npm install
in the plugin root folder. You'll need to be using the versions of Node and NPM specified in theengines
section of package.json. - Run
npm start
in the plugin root folder. Then add the blocks in the assets/src/blocks/ folder. Webpack will watech this folder for changes and build a single output file, which is enqueued in the block editor. - This plugin doesn't currently load, handle or compile any CSS. That belongs in the Theme.
Mark Howells-Mead | www.permanenttourist.ch | Since 1st February 2022
Please respect the GPL v3 licence, which is available via http://www.gnu.org/licenses/gpl-3.0.html