Skip to content

Commit c1ad487

Browse files
authored
fix: wrap nuxt runtime plugin in defineNuxtPlugin (#241)
1 parent ae94226 commit c1ad487

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎src/nuxt/runtime/plugin.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { defineNuxtPlugin } from "#imports"
12
import { vAutoAnimate } from "../../vue/index"
23

34
type NuxtAppLike = {
@@ -9,7 +10,7 @@ type NuxtAppLike = {
910
}
1011
}
1112

12-
export default function autoAnimateNuxtPlugin(app: NuxtAppLike) {
13+
export default defineNuxtPlugin((nuxtApp: NuxtAppLike) => {
1314
// Register the directive
14-
app.vueApp.directive("auto-animate", vAutoAnimate)
15-
}
15+
nuxtApp.vueApp.directive("auto-animate", vAutoAnimate)
16+
})

0 commit comments

Comments
 (0)