Nebula icon indicating copy to clipboard operation
Nebula copied to clipboard

Use the new WP core method of adding defer/async to JavaScript assets

Open chrisblakley opened this issue 1 year ago • 0 comments

Nebula has a Rube Goldberg machine of a way to async/defer JavaScript assets, but now as of WP core 6.3 they are no longer needed. This will reduce the complexity of registering Nebula assets. However, some of the functionality will still be needed for module scripts and crossorigin assets, so we'll need to surgically remove the vestigial functionality.

Documentation for the new wp_register_script() function: https://make.wordpress.org/core/2023/07/14/registering-scripts-with-async-and-defer-attributes-in-wordpress-6-3/

Screen Shot 2023-11-13 at 4 33 01 PM

Screen Shot 2023-11-13 at 4 32 58 PM

chrisblakley avatar Nov 13 '23 21:11 chrisblakley