[wp-trac] [WordPress Trac] #56313: Add the ability to handle ES Modules and Import Maps
WordPress Trac
noreply at wordpress.org
Fri Jan 12 22:26:09 UTC 2024
#56313: Add the ability to handle ES Modules and Import Maps
-------------------------------------+-------------------------------------
Reporter: idad5 | Owner: luisherranz
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.5
Component: Script Loader | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit- | Focuses: javascript,
tests | performance
-------------------------------------+-------------------------------------
Comment (by azaozz):
Replying to [comment:46 johnbillion]:
> 1. The naming consideration raised in the discussion on
https://github.com/WordPress/wordpress-develop/pull/5818
Yeah, this needs fixing. Thinking these https://github.com/WordPress
/wordpress-develop/pull/5818#issuecomment-1887867378 are quite better.
> 3. Is it desirable or possible for a module to depend on a non-module
script, or vice versa? Should it be?
I'm "on the fence" on this but thinking perhaps not for now. A JS module
depending on jQuery? Seems a bit like like mixing apples with oranges? :)
Really want to see some "real life" examples of how that would work, and
how useful it may be. Also should this even be needed in PHP or can it be
done better in the browser/with JS? Modules are loaded as either `defer`
or `async`, so any hard-coded "old-style" JS (that is outputted before any
modules in the HTML head) will always be available to them.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56313#comment:51>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list