-
-
Notifications
You must be signed in to change notification settings - Fork 476
Open
Description
The current plugin syntax breaks the type generation of Nuxt. Meaning it break the type inference of all subsequent plugins.
The code should be refactored from:
// old syntax
import vuePlugin from 'lenis/vue'
// @ts-expect-error - nuxt weird static types man
import { defineNuxtPlugin } from '#imports'
const plugin = defineNuxtPlugin({
name: 'lenis',
setup(nuxtApp: any) {
nuxtApp.vueApp.use(vuePlugin)
},
})
export default plugin
to
// current syntax
import vuePlugin from 'lenis/vue'
// @ts-expect-error - nuxt weird static types man
import { defineNuxtPlugin } from '#imports'
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(vuePlugin)
})
Metadata
Metadata
Assignees
Labels
No labels