Problem/Motivation
Component library is missing when it is not rendered via Twig.
If rendered with Drupal JavaScript API - such as a custom Drupal.theme.myComponent for instance - the component's library is not loaded.
Steps to reproduce
- Create a single-directory component in a module
- Render the component programmatically
- Attach the output in drupalSettings
- Create a custom
Drupal.theme.myComponentfunction and consume the output - Call the Drupal.theme
- Result: the component Twig is rendered but the library is missing (i.e. no CSS no JS)
Proposed resolution
TBD
Remaining tasks
TBD