How would I go about making sure that any view.js script tags that are automatically being included have "defer" or "async" attributes assigned to them?
You would have to override the file responsible for building each JavaScript asset's element, then check that it is one of the view.js file or inside a block's js folder and for those you'd have to add the attribute you want.
For JavaScript assstes it's concrete\src\Asset\JavascriptAsset.php
But it won't necessarily do you any good. For instance, if you set your cache to minify and concatenate JS and CSS, you won't necessarily be able to separate those files from others.
When C5 concatenates JS files, for instance, it adds a data-source attribute to the script element. That data-source lists all the scripts that were concatenated in this one script.
So you could add defer or async to that one but it will probably be a big mix of different scripts, not necessary only the ones you want.
For JavaScript assstes it's concrete\src\Asset\JavascriptAsset.php
But it won't necessarily do you any good. For instance, if you set your cache to minify and concatenate JS and CSS, you won't necessarily be able to separate those files from others.
When C5 concatenates JS files, for instance, it adds a data-source attribute to the script element. That data-source lists all the scripts that were concatenated in this one script.
So you could add defer or async to that one but it will probably be a big mix of different scripts, not necessary only the ones you want.