Ollie Block Academy

Creating a Block Plugin From Scratch

Installing the WP Scripts package

@wordpress/scripts provides essential build tools for modern JavaScript development in WordPress. This NPM package contains scripts for compiling, bundling, and optimizing block code for both development and production.

Install it as a development dependency using “npm install @wordpress/scripts –save-dev” since these tools are only needed during development, not for running blocks in production.

The installation creates node_modules directory with all dependencies and package.json/package-lock.json files that track exact versions for consistent builds across different environments.

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