Skip to content

Conversation

@manzoorwanijk
Copy link
Member

Extracted out of #74143 (comment)

What?

This fixes the race condition in npm run storybook:dev. The .dev-ready marker was created before wp-build --watch finished its initial transpilation, allowing Storybook to start while packages were still being built. This latent bug became apparent with Storybook 9's faster startup, causing "Module not found" errors for @wordpress/* packages.

The fix waits for wp-build to output "Watching for changes..." before creating the marker.

Why?

How?

Testing Instructions

  • Run npm run dev and npm run storybook:dev
  • Confirm that they both work fine
  • Send SIGINT - Ctrl + c
  • Verify that the processes end gracefully

Testing Instructions for Keyboard

Screenshots or screencast

Before After

@manzoorwanijk manzoorwanijk self-assigned this Dec 31, 2025
@manzoorwanijk manzoorwanijk added the [Type] Build Tooling Issues or PRs related to build tooling label Dec 31, 2025
@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: manzoorwanijk <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants