[wp-trac] [WordPress Trac] #56313: wp_enqueue_script needs to be able to handle modules (ES6/ES2020)

WordPress Trac noreply at wordpress.org
Mon Jun 26 15:10:16 UTC 2023


#56313: wp_enqueue_script needs to be able to handle modules (ES6/ES2020)
---------------------------+--------------------------------------
 Reporter:  idad5          |       Owner:  (none)
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Future Release
Component:  Script Loader  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  needs-patch    |     Focuses:  javascript, performance
---------------------------+--------------------------------------
Changes (by joemcgill):

 * keywords:  2nd-opinion => needs-patch
 * focuses:  javascript => javascript, performance
 * milestone:  Awaiting Review => Future Release


Comment:

 I think we should consider implementing this. Browser support for this is
 [https://caniuse.com/es6-module already in a good place]. Having an
 official way to register modules will allow us to dynamically keep unused
 javascript from being sent to clients.

 **Related:**
 - [https://github.com/WordPress/gutenberg/issues/36716 Gutenberg #36716]
 - #48654 (Trac)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56313#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list