Skip to content

Enqueue assets using dependencies and version from index.asset.php#22

Open
Jefferson08 wants to merge 1 commit intoLearnWebCode:mainfrom
Jefferson08:feature/use-asset-php
Open

Enqueue assets using dependencies and version from index.asset.php#22
Jefferson08 wants to merge 1 commit intoLearnWebCode:mainfrom
Jefferson08:feature/use-asset-php

Conversation

@Jefferson08
Copy link

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.

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.
@dreDevOS
Copy link

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants