[wp-trac] [WordPress Trac] #60597: Script Modules API: Allow list of enqueued module data to be exposed

WordPress Trac noreply at wordpress.org
Thu Nov 14 22:11:59 UTC 2024


#60597: Script Modules API: Allow list of enqueued module data to be exposed
---------------------------+-----------------------------
 Reporter:  johnbillion    |       Owner:  (none)
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Future Release
Component:  Script Loader  |     Version:  6.5
 Severity:  normal         |  Resolution:
 Keywords:  needs-patch    |     Focuses:
---------------------------+-----------------------------

Comment (by justlevine):

 Another use case:

 I'm working to add Block Theme support for WPGraphQL, for which we need to
 be able to return the array of enqueued script modules so a headless
 frontend can generate and output the corresponding `<script>` tags
 (alongside the traditional `$wp_scripts`).


 Similar use case to John's Query Monitor, except this is for frontend
 rendering, not an admin tool, so we ideally want to avoid the reflection
 penalty.

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


More information about the wp-trac mailing list