Skip to content

Conversation

@Utsav-Ladani
Copy link
Contributor

What?

Closes #72479

Enqueue non-minified JS files when SCRIPT_DEBUG is enabled.

Why?

Using non-minified JavaScript files will display readable component names in React Dev Tools, improving debugging efficiency.

How?

  • Enqueue non-minified JS files when SCIRPT_DEBUG is set to true
  • Enqueue minified JS files when SCIRPT_DEBUG is set to false

Testing Instructions

  1. Set SCRIPT_DEBUG to true.
  2. Build the project.
  3. Open the Block Editor in your browser.
  4. Install the React Dev Tools extension.
  5. Open the Component tab in the Browser Dev Tools.
  6. Check the component names.

They should be human-readable names instead of Rxt, Ety, etc.

Screenshots

Before After
Screenshot 2025-10-20 at 3 19 17 PM Screenshot 2025-10-20 at 3 19 40 PM

@github-actions
Copy link

github-actions bot commented Oct 20, 2025

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: Utsav-Ladani <utsavladani@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>

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

@t-hamano t-hamano added the [Type] Build Tooling Issues or PRs related to build tooling label Oct 20, 2025
@Utsav-Ladani Utsav-Ladani requested a review from Mamaduka October 20, 2025 11:06
@Mamaduka Mamaduka added the No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core label Oct 20, 2025
@Mamaduka
Copy link
Member

I think no sync is required for these changes.

@Mamaduka Mamaduka merged commit 2c92834 into WordPress:trunk Oct 20, 2025
74 of 76 checks passed
@github-actions github-actions bot added this to the Gutenberg 22.0 milestone Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core [Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build v2: Use non-minified JS file when SCRIPT_DEBUG is true

4 participants