mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-21 07:21:46 +01:00
15 lines
361 B
TypeScript
15 lines
361 B
TypeScript
import { createHead } from '@unhead/vue/client'
|
|
import type { Plugin } from 'vue'
|
|
|
|
export default {
|
|
install(app) {
|
|
// check for existing head instance to avoid replacement
|
|
// bit hacky but we can't use injectHead() here
|
|
if (app._context.provides.usehead) {
|
|
return
|
|
}
|
|
const head = createHead()
|
|
app.use(head)
|
|
}
|
|
} satisfies Plugin
|