[wp-trac] [WordPress Trac] #63254: Introduce development mode for block editor styles

WordPress Trac noreply at wordpress.org
Fri Jun 20 02:30:47 UTC 2025


#63254: Introduce development mode for block editor styles
------------------------------------+-----------------------
 Reporter:  helgatheviking          |       Owner:  audrasjb
     Type:  defect (bug)            |      Status:  accepted
 Priority:  normal                  |   Milestone:  6.8.2
Component:  Editor                  |     Version:  5.5
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+-----------------------

Comment (by rollybueno):

 == Reproduction Report
 === Description
 This report validates whether the issue can be reproduced.

 The issue relates to how block editor styles are cached. In development
 environments, style and script changes may not reflect immediately due to
 static versioning. The patch introduces timestamp-based versioning when
 `SCRIPT_DEBUG` is enabled, allowing changes to reflect immediately without
 clearing the cache.

 === Environment
 - WordPress: 6.9-alpha-60093-src
 - PHP: 8.2.28
 - Server: nginx/1.27.5
 - Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
 - Browser: Chrome 136.0.0.0
 - OS: Linux
 - Theme: Twenty Twenty-Five 1.2
 - MU Plugins: None activated
 - Plugins:
   * Test Reports 1.2.0

 === Actual Results
 1. ✅ Error condition occurs (reproduced).
    - Block editor assets are not cache-busted during development.
    - Changes to SCSS/JS do not reflect unless cache is manually cleared.

 === Steps to Reproduce
 1. Check out the latest WordPress develop repo.
 2. Make sure that `define( 'SCRIPT_DEBUG', true );` is set.
 3. Open a post in the Block Editor.
 4. Use browser DevTools to inspect block editor CSS/JS URLs.
 5. Confirm static `ver` is used (e.g., `ver=6.9-alpha...`) — indicating no
 cache-busting.

 === Additional Notes
 - This behavior only applies when `SCRIPT_DEBUG` is enabled.
 - Useful in local development when iterating on block styles or scripts.
 - On the JS side, some core files like `block-editor.js` `editor.js`
 `edit-post.js` already appear to include cache-busting based on the ver
 parameter and may not be affected by this patch.

 === Supplemental Artifacts
 Current trunk:

 **Editor related CSS**:
 [[Image(https://i.imgur.com/bPXRwPM.png)]]

 **Editor related JS**:
 [[Image(https://i.imgur.com/Ci1UrkU.png)]]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63254#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list