Loading
Resolve #3625091: Build library elements from the asset resolver
Claude Code: opened on behalf of fago. Replaces !202 (closed): same commits, plus one commit adding an interface for the generator. !202 (closed)'s branch lives in the main project and can only be updated by a maintainer.
Issue #3625091
Changes
- The
drupal-library-*elements are built fromAssetResolver::getJsAssets(), so files come in Drupal's real load order across all dependencies. - Elements carry static
drupalSettingsonly: those declared by libraries or attached to the render array. Request-specific settings stay with the frontend. - Elements get the
library_infocache tag and thelanguages:language_interfaceandthemecache contexts. - New
DrupalLibraryElementGeneratorInterface, implemented by the generator, so the service can be decorated.
Testing
DrupalLibraryElementTest (kernel), 10 tests.
AI-Generated: Yes (Claude Code wrote the interface commit and this text)
Edited by Wolfgang Ziegler