I am importing a external JS file (google map) as external resource, as defined in the documentation
https://nuxtjs.org/faq/
It is working fine.
But if I test my deployed page on Google Speed Insight, it warns me I got some JS loading time to improve for this file: "Your page has 1 blocking script resources. This causes a delay in rendering your page."
Usually I know how to solve the problem: adding an "async" or "defer" to an external js file loaded.
But now with the Nuxt logic I am not sure if it possible.
Question: in Nuxt could I set to load js external resources as "async" or "defer" ? Is this the right approach to solve performance issue?
Nuxt uses Vue meta, have you tried in this way?
{ src: 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js', defer: true }
@microcipcip : perfect! exactly what I was looking for!
Now I will check Vue Meta a little more ... 馃槂
Thanks
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Nuxt uses Vue meta, have you tried in this way?