[wp-trac] [WordPress Trac] #56313: Add the ability to handle ES Modules and Import Maps

WordPress Trac noreply at wordpress.org
Mon Feb 12 13:12:15 UTC 2024


#56313: Add the ability to handle ES Modules and Import Maps
-------------------------------------+-------------------------------------
 Reporter:  idad5                    |       Owner:  luisherranz
     Type:  enhancement              |      Status:  closed
 Priority:  normal                   |   Milestone:  6.5
Component:  Script Loader            |     Version:
 Severity:  normal                   |  Resolution:  fixed
 Keywords:  has-patch has-unit-      |     Focuses:  javascript,
  tests needs-dev-note               |  performance
-------------------------------------+-------------------------------------

Comment (by gziolo):

 There is now a way to deregister a script module added with #60463:

 {{{#!php
 <?php
 function wp_deregister_script_module( string $id ) {
         wp_script_modules()->deregister( $id );
 }
 }}}

 The question is, should we call it `wp_deregister_script_module ` for
 consistency with scripts and styles. If we want to keep consistency,
 should we also rename all `$id` params with `$handle` and `deregister()`
 method with `remove()`?

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


More information about the wp-trac mailing list