Skip to content

Commit

Permalink
Register the runtime's debug version when appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
DAreRodz committed May 8, 2024
1 parent 1bebdfa commit 6088342
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,12 @@ public function print_client_interactivity_data() {
public function register_script_modules() {
$suffix = wp_scripts_get_suffix();

// Use a debug version of the runtime when SCRIPT_DEBUG is enabled.
$runtime_module = SCRIPT_DEBUG ? 'interactivity-debug' : 'interactivity';

wp_register_script_module(
'@wordpress/interactivity',
includes_url( "js/dist/interactivity$suffix.js" )
includes_url( "js/dist/$runtime_module$suffix.js" )
);

wp_register_script_module(
Expand Down

0 comments on commit 6088342

Please sign in to comment.