domready is not defined I'm building my own theme to be used with Angular 4 and can't tell where/why Drupal is deciding to import jQuery.

Here's the code for my theme, loosely based off this Angular 1 theme:

ng.info.yml

name: ng
type: theme
libraries:
  - ng/base
description: 'An theme that makes Angular do all the work'
core: 8.x


ng.libraries.yml

base:
  version: 8.x
  js:
    js/inline.bundle.js: {}
    js/polyfills.bundle.js: {}
    js/styles.bundle.js: {}
    js/vendor.bundle.js: {}
    js/main.bundle.js: {}


ng.module

&lt;?php
function ng_theme() {
  return array(
    'ng_view' =&gt; array(
      'template' =&gt; 'view',
      'variables' =&gt; array('title' =&gt; NULL),
    ),
  );
}


ng.routing.yml

ng.view:
  path: 'ng'
  defaults:
    _title: 'Drupal Angular'
    _controller: '\Drupal\ng\Controller\DrupalNgController::viewDrupalNg'
  requirements:
    _permission: 'access content'


src/Controller/DrupalNgController

namespace Drupal\ng\Controller;
use Drupal\Core\Controller\ControllerBase;
class DrupalNgController extends ControllerBase {
  public function viewDrupalNg() {
    $build['myelement'] = array(
      '#theme' =&gt; 'ng_view',
    );
    $build['myelement']['#attached']['library'][] = 'ng/inline.bundle';
    $build['myelement']['#attached']['library'][] = 'ng/polyfills.bundle';
    $build['myelement']['#attached']['library'][] = 'ng/styles.bundle';
    $build['myelement']['#attached']['library'][] = 'ng/vendor.bundle';
    $build['myelement']['#attached']['library'][] = 'ng/main.bundle';
    return $build;
  }
}


templates/view.html.twig

&lt;html{{ html_attributes }}&gt;
  &lt;head&gt;
    &lt;title&gt;Angular app&lt;/title&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"&gt;
    &lt;meta name="HandheldFriendly" content="true" /&gt;
    &lt;meta name="apple-touch-fullscreen" content="YES" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;app-root&gt;&lt;/app-root&gt;
  &lt;/body&gt;
&lt;/html&gt;
Given you didn't install any contrib modules nor themes, dozens of Drupal core modules requires Jquery to function. You'll have to check what modules lists JQuery as a dependency.
Search in core/modules and core/themes directories for core/jquery and you'll find out what module/theme is adding it and disable it.

For example "contextual" module needs it.