Use case: some light JavaScript code, loaded by all users who enabled a gadget, which conditionally loads the 'real' gadget only if it is going to be useful.
Description
Related Objects
Event Timeline
What is the criteria for "going to be useful"? Seems like your usecase might be covered by T63007: Allow specifying when a gadget should load (conditional category, action, or namespace).
We could also implement skip-module support in Gadgets, but that's mostly for feature detection I think...
Is this a bug report? Is this a feature request? From reading the summary "More than 1 ResourceLoader module for each gadget?", I have no idea. Adding a verb is welcome. :)
This one is broader than T63007. Conditions might include not only patterns to match the page title against, but also different buttons loading different parts of the gadget on demand, etc., which is good for promptness but hard to do with a purely declarative syntax.
Creating multiple definitions is quite straight-forward. The complexity required to somehow allow multiple modules in one definition is imho not worth the minimal gain (which is that a gadget author would have to type just a few characters less).