Skip to content

Is is possible to add a 3rd-party script in nuxt.config and load it via trigger? #443

Answered by harlan-zw
Farmatique asked this question in Q&A

You must be logged in to vote

Hey, you should just use the useScript() composable within your app.vue

const { load } = useScript('/assets/scripts/swiftype.js', {
  triger: 'manual'
})

// ...

load()

Replies: 1 comment 1 reply

You must be logged in to vote
1 reply
@Farmatique

Answer selected by Farmatique
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants