Ollie Block Academy

Creating a Block Plugin From Scratch

Using WP Scripts to build blocks – A

WP Scripts supports automatic block detection by scanning subdirectories for block.json files. This enables building multiple blocks from a single source directory with individual entry points.

Each block gets its own subdirectory in source/ with its own index.js and block.json, creating isolated builds in corresponding build/ subdirectories for better performance and organization.

This structure scales naturally from one block to many blocks, avoiding the limitations of single-entry builds while maintaining a clean, organized codebase.

Back to: Ollie Block Academy > Creating a Block Plugin From Scratch