Scope javascripts to be outside admin Now when we are almost there using purely YML files to include JavaScript, is it possible to include javascripts everywhere except for in the Drupal administration? Beta 4 does not allow the #attached property anymore, so this solution would be best suited in a YML setup.
Sure. Drupal 8 still allows #attached, the difference is just that you specify a library instead of a specific javascript file, but that is irrelevant for your question.

You can implement hook_page_attachments() and ask the route context if this is an admin route.

/**
 * Implements hook_page_attachments().
 */
function yourmodule_page_attachments(&amp;$page) {
  // This returns TRUE for admin paths.
  if (!\Drupal::service('router.admin_context')-&gt;isAdminRoute()) {
    $page['#attached']['library'][] = 'yourmodule/yourlibrary';
  }
}