retrofit
retrofit copied to clipboard
Set up theme libraries from stylesheets information in info file
system_page_attachments
:
// Attach libraries used by this theme.
$active_theme = \Drupal::theme()->getActiveTheme();
foreach ($active_theme->getLibraries() as $library) {
$page['#attached']['library'][] = $library;
}