[wp-trac] [WordPress Trac] #47285: Better Management of External Asset Dependencies
WordPress Trac
noreply at wordpress.org
Wed May 15 19:11:38 UTC 2019
#47285: Better Management of External Asset Dependencies
-----------------------------+--------------------------------------
Reporter: justlevine | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Script Loader | Version:
Severity: major | Resolution:
Keywords: | Focuses: javascript, performance
-----------------------------+--------------------------------------
Comment (by swissspidy):
Worth noting that the theme directory has some requirements for theme
developers to always use the same script handle for external libraries
when they use `wp_register_script()`. That already solves many issues.
> Defining $vers, WordPress will be able to look at all 3 different
versions of bootstrap and automagically know which one to include! Plugin
A requires 4.1.1, Plugin B ^4.0, and Plugin C is still stuck with ~3.0.5,
and suddenly you've been able to drop a redundant library but your legacy
plugin is still working fine!
Resolving dependencies is not an easy task like this. Especially when not
all libraries can be easily loaded multiple times.
https://journal.rmccue.io/322/plugin-dependencies/ is a good article about
how that works. Different area, but similar problems.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47285#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list