Static GitHub Issues

[2437] Loading Async/Defer some external resources JS?

prev: Nuxt in production
next: How to exclude node_modules but one package from babel-loader?

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?

<!--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/c2113">#c2113</a>)</em></sub></div>