I looked through the documentation and they suggest only three available methods:
- Declarative notation using the
- Declarative notation with the
<script type="text/x-magento-init" />tag.
- Imperative notation with the
Each of these methods all require adding/editing a phtml file.
Also, the documentation seems to contradict itself.
These methods all seem a little convoluted and over engineered, I starting to think I should only add one JS file with RequireJS for my entire theme, and have it load on every page, even if it's only being used on a few. Is this good practice? I just want to add some jQuery to a few pages.