Nuxt/test/fixtures/basic/plugins/my-plugin.ts

13 lines
235 B
TypeScript

export default defineNuxtPlugin(() => {
useHead({
titleTemplate: '%s - Fixture',
})
const path = useRoute()?.path
return {
provide: {
myPlugin: () => 'Injected by my-plugin',
path: () => path,
},
}
})