-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
🐛 The bug
I'm trying to figure out how to add data-*
attributes to scripts with useScript() in app.vue
.
The following should be working according to the docs, but it doesn't. The script is loaded, but the data-test
attribute is missing.
// My code
useScript({
'src': 'https://analytics.ahrefs.com/analytics.js',
'data-test': 'some-value-here',
})
From the docs here:

There is also mention of an attributes
key in UseScriptInput, which doesn't seem to exist:

🛠️ To reproduce
https://stackblitz.com/edit/nuxt-scripts-attributes-not-working?file=app.vue
🌈 Expected behavior
data-*
properties should show up in the source and attributes
should either work, or be removed from the docs.
ℹ️ Additional context
nuxt/scripts@v0.9.5
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working