Updated: Comment #0

Problem/Motivation

Currently calling libraries_load() without specifying a variant name simply does not overload any variant information. In the canonical use-case for variants, however, JS-libraries with 'minified' and 'source' variants, it makes sense to specify files only below the variants key but not in the top-level files key. This means, however that calling libraries_load() without a variant name in that case marks the library as loaded, but does not actually load any files.

Proposed resolution

Provide some facility for libraries to register a list of variant preferences and - if that is provided - automatically load the most preferred variant.

Remaining tasks

User interface changes

API changes