2 * Implements hook_page_attachments_alter().
4 function {{ machine_name }}_page_attachments_alter(array &$attachments) {
5 // Conditionally remove an asset.
6 if (in_array('core/jquery', $attachments['#attached']['library'])) {
7 $index = array_search('core/jquery', $attachments['#attached']['library']);
8 unset($attachments['#attached']['library'][$index]);