mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-12 09:03:53 +00:00
1a7b570c82
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
10 lines
286 B
TypeScript
10 lines
286 B
TypeScript
export default defineNuxtPlugin(() => {
|
|
addRouteMiddleware('global-test', () => {
|
|
console.log('this global middleware was added in a plugin')
|
|
}, { global: true })
|
|
|
|
addRouteMiddleware('named-test', () => {
|
|
console.log('this named middleware was added in a plugin')
|
|
})
|
|
})
|