From 5f7dd5af0a2ee2d483050216e7d9e9ae29ed27bb Mon Sep 17 00:00:00 2001 From: jefferson08 Date: Thu, 15 May 2025 23:49:01 -0300 Subject: [PATCH] Enqueue assets using dependencies and version from index.asset.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refactored the wp_enqueue_script call to use the auto-generated index.asset.php file created by @wordpress/scripts during build. This ensures that all necessary script dependencies (like react-jsx-runtime) and the correct version are automatically loaded. There's no need to manually add 'react' or 'react-dom' as dependencies — they are already included in the .asset.php file based on imports. --- .../functions.php | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/brads-boilerplate-theme-tailwind/functions.php b/brads-boilerplate-theme-tailwind/functions.php index 836bfe7..6f38085 100644 --- a/brads-boilerplate-theme-tailwind/functions.php +++ b/brads-boilerplate-theme-tailwind/functions.php @@ -1,15 +1,25 @@