#61171 closed enhancement (fixed)
Interactivity API: Include preact/debug when SCRIPT_DEBUG is enabled
| Reported by: | darerodz | Owned by: | gziolo |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.6 |
| Component: | Interactivity API | Version: | 6.6 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | javascript |
Description
This ticket tracks the backporting of PHP files for the following Gutenberg changes:
Interactivity API: Include preact/debug when SCRIPT_DEBUG is enabled
It makes WordPress enqueue a different Interactivity API runtime version depending on the value of the SCRIPT_DEBUG constant.
Change History (5)
This ticket was mentioned in PR #6527 on WordPress/wordpress-develop by @darerodz.
2 years ago
#1
- Keywords has-patch added
@darerodz commented on PR #6527:
2 years ago
#3
The @wordpress/interactivity version has not been updated yet in WordPress::trunk so it is expected to see errors in the tests like the following one:
Module not found: Error: Can't resolve '/home/runner/work/wordpress-develop/wordpress-develop/node_modules/@wordpress/interactivity/build-module/debug' in '/home/runner/work/wordpress-develop/wordpress-develop'
I tried this patch, and the changes work as expected:
-
package.json
diff --git a/package.json b/package.json index 0d2549d42c..ed3cae92ff 100644
a b 112 112 "@wordpress/html-entities": "3.51.1", 113 113 "@wordpress/i18n": "4.51.1", 114 114 "@wordpress/icons": "9.42.4", 115 "@wordpress/interactivity": "5. 0.5",115 "@wordpress/interactivity": "5.5.0", 116 116 "@wordpress/interactivity-router": "1.1.5", 117 117 "@wordpress/interface": "5.28.6", 118 118 "@wordpress/is-shallow-equal": "4.51.1",
2 years ago
#5
Committed with https://core.trac.wordpress.org/changeset/58195.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Syncs the changes from the following PR:
Enqueues a different Interactivity API runtime version with
preact/debugwhenSCRIPT_DEBUGis enabled.Trac ticket: https://core.trac.wordpress.org/ticket/61171