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

WordPress Trac noreply at wordpress.org
Sun Jul 31 06:27:37 UTC 2022

#56313: wp_enqueue_script needs to be able to handle modules (ES6/ES2020)
 Reporter:  idad5          |      Owner:  (none)
     Type:  enhancement    |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Script Loader  |    Version:
 Severity:  major          |   Keywords:
  Focuses:                 |
 wp_enqueue_script should be augmented to add scripts with type="module" to
 Or a new function like wp_enqueue_module etc. should be created.

 Also having the ability to ad a nomodule scrip-tag should be considered,
 even though ES6 ans ES2020 module support is very wide spread.

 Especially ES2020 dynamic modules are a feature that really should be
 available for theme developers, as it is the best (standard conform) way
 to handle dynamically loading JS at runtime.

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

More information about the wp-trac mailing list