Interactivity API: Include preact/debug when SCRIPT_DEBUG is enabled

Syncs the changes from Gutenberg: https://github.com/WordPress/gutenberg/pull/60514. Enqueues a different Interactivity API runtime version with preact/debug when SCRIPT_DEBUG is enabled.

Props darerodz, jonsurrell, gziolo.
Fixes .



git-svn-id: https://develop.svn.wordpress.org/trunk@58195 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Greg Ziółkowski 2024-05-24 09:40:04 +00:00
parent cef692115c
commit 6bb6a45e39

@ -32,10 +32,14 @@ module.exports = function (
entry: MODULES.map( ( packageName ) =>
packageName.replace( WORDPRESS_NAMESPACE, '' )
).reduce( ( memo, packageName ) => {
const path =
'development' === mode && 'interactivity' === packageName
? 'interactivity/build-module/debug'
: packageName;
memo[ packageName ] = {
import: normalizeJoin(
baseDir,
`node_modules/@wordpress/${ packageName }`
`node_modules/@wordpress/${ path }`
),
};