Skip to content

Scripts: --blocks-manifest argument may not create block manifest file #69760

@t-hamano

Description

@t-hamano

Description

In #69578, a new --blocks-manifest argument was added to create the blocks manifest file. This argument is primarily needed to ensure the block manifest file is not removed while developing blocks in watch mode.

However, it has been reported here that this parameter may not work in some environments.

Note: The root cause was found. See #69760 (comment)

Step-by-step reproduction instructions

Please follow the steps below:

  1. Create a plugin that includes a custom block template: npx @wordpress/create-block@latest test-block
  2. Open the directory
  3. Is your @wordpress/scripts version 30.14.0? Check the devDependencies field in the package.json file.
  4. Check the start and build command in the package.json file. They should be "start": "wp-scripts start --blocks-manifest" and "build: wp-scripts build --blocks-manifest".
  5. Run npm run start or npm run build
  6. Confirm that the test-block/build/blocks-manifest.php file is created
    If you encountered any problems, please leave your environment information:
  • OS (e.g.Windows or MacOS)
  • node version, npm version
  • Did you see any error logs/messages?

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions