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

13 lines
232 B
TypeScript
Raw Normal View History

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