Closed EngineerMonkey404 closed 2 months ago
Would you be able to provide a reproduction? ๐
I've added reproduction here: https://stackblitz.com/edit/nuxt-starter-kuu91v?file=app.vue
Also, the issue happened to me after upgrading to the latest version of nuxt
Issue seems to be happening here https://github.com/vueuse/motion/blob/eb7c01de524be8fef787148ee146aa780dd3692d/src/directive/index.ts#L24
it seems that we are receiving a vue ref object and so the stucturedClone
fails. it's possibly because the directive usage of custom presets from nuxt are Refs
?
Not sure who to tag here but i have an open PR that potentially fixes this issue here https://github.com/vueuse/motion/pull/221
@Tahul @BobbieGoede
This should be resolved thanks to @hajiskyy's contribution! You can install a preview release containing the fix like so npm i https://pkg.pr.new/@vueuse/motion@221
until a new full release has been published.
System info
Linux
v20.16.0
3.13.0
3.13.0
2.9.7
npm@10.8.1
-
compatibilityDate
,devtools
,modules
,runtimeConfig
@vueuse/motion/nuxt@2.2.3
-
Reproduction
Create new nuxt project, install @vueuse/motion and add it to nuxt modules, then create custom directive runtimeConfig: { public: { motion: { directives: { 'pop-bottom': { initial: { opacity: 0, y: 100 }, enter: { opacity: 1, y: 0, transition: { duration: 400 }, }, } }
then create something like this and you get this
Describe the bug
Cannot use custom animation in Nuxt3 with vueuse/motions directive
Additional context
No response
Logs
No response