Looking at the js src files that nuxt generates they are listed in two groups in the resulting html code. The 'normal' src files are in the header tag and the deferred src files are added at the bottom of the body.
With this.options.head.script
we are able to add additional js src files to the code, but they are always added to the header tag. It would be nice if we could also add js src files to the bottom of the body, e.g. after the generated app.js
.
Maybe even just always add deferred src files at the bottom (but then you are contradicting the head
part of this.options):
this.options.head.script.push({
src: options.scriptUrl || options.piwikUrl+'piwik.js',
async: true,
defer: true
})
See #1330 for a use case
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1214">#c1214</a>)</em></sub></div>