I rename the default build folder to blocks, but when I execute the command for zip npm run plugin-zip I get only two files in the zip output (dts-haya.php, readme.txt).

My folder blocks contain two custom blocks, and the src folder two blocks. When I return with the default build folder and execute the zip command the plugin is zip correctly with the build folder and her subfolders (dyslocosaurus, miragaia).

How I set npm run plugin-zip locate the custom folder blocks?

├─ node_modules/
├─ blocks/
│  ├─ dyslocosaurus/
│  ├─ miragaia/
├─ src/
│  ├─ dyslocosaurus/
│  ├─ miragaia/
├─ README.txt
├─ dts-haya.php
├─ package-lock.json
├─ package.json


    "name": "dts-haya",
    "version": "1.0.0",
    "description": "Blocks for DetonaSaurus.",
    "author": "DetonaSaurus",
    "license": "-",
    "homepage": "-",
    "main": "blocks/",
    "scripts": {
        "build": "wp-scripts build --output-path=blocks",
        "format": "wp-scripts format",
        "lint:css": "wp-scripts lint-style",
        "lint:js": "wp-scripts lint-js",
        "packages-update": "wp-scripts packages-update",
        "plugin-zip": "wp-scripts plugin-zip",
        "start": "wp-scripts start --output-path=blocks"
    "devDependencies": {
        "@wordpress/scripts": "^26.14.0"


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.