Skip to content

vue-doctor/bundle-size/no-undeferred-third-party ​

Use useHead with defer: true or add the defer attribute to third-party scripts

PropertyValue
CategoryBundle Size
Default Severitywarning
Confidencemedium
FixableNo
Engineoxlint
Sincev1.0.0
Frameworksvue, nuxt
Test filesNot checked (which files)

Why it matters ​

Use useHead with defer: true or add the defer attribute to third-party scripts

How to fix ​

Review the finding and update the code according to best practices below.

Agent Guidance ​

Add defer: true (or async: true) to every script entry with a src passed to useHead({ script: [...] }) so third-party scripts do not block rendering.


Rule source: vue-doctor/bundle-size/no-undeferred-third-party

Released under the MIT License.