Skip to content

如何为每个页面插入自定义的 JavaScript 代码? #4395

Answered by FuckDoctors
Ackerven asked this question in Q&A
Discussion options

You must be logged in to vote

可如下配置:

// config.ts
export default defineUserConfig({
  head: [
    [
      'script',
      {
        src: 'Google Analytics js',
      },
    ],
  ]
})

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Mister-Hope
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