So vue-cli 3 will automatically inject all the links to asset files in the HTML file. It includes the assets with the preload and prefetch attributes as well.
I want to use my own HTML template and insert these same assets into it with the preload and prefetch attributes.
I have done this in the past by using something like this example, but it doesn't include the preload and prefetch attributes.
<% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
<script src="{% static '<%= htmlWebpackPlugin.files.chunks[chunk].entry %>' %}"></script>
<% } %>
I've looked at all the info available inside the htmlWebpackPlugin object but I don't see anything in there that I can use to determine if the asset should use prefetch or preload and with the as=script.
How can I do this? Obviously vue-cli 3 is doing it, but I'm not sure how.