[wp-trac] [WordPress Trac] #64907: Script Modules: Import map can print after classic footer scripts in wp-admin, breaking bare specifier resolution

WordPress Trac noreply at wordpress.org
Thu Mar 19 18:57:47 UTC 2026


#64907: Script Modules: Import map can print after classic footer scripts in wp-
admin, breaking bare specifier resolution
---------------------------+------------------------------
 Reporter:  mlaetitia      |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Script Loader  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:  javascript
---------------------------+------------------------------

Comment (by mlaetitia):

 I wanted to add something to the description:


 Both screens use an inline classic script that calls
 `import("@wordpress/boot")` to bootstrap the page. For this to work, the
 browser needs the import map (`<script type="importmap">`) to already be
 in the DOM. When certain plugins are active, the import map prints *after*
 the classic scripts instead of before them, so the browser can't resolve
 the bare specifier.

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


More information about the wp-trac mailing list