Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom directive with nuxt plugin #244

Open
remirobichet opened this issue Nov 21, 2024 · 0 comments
Open

Custom directive with nuxt plugin #244

remirobichet opened this issue Nov 21, 2024 · 0 comments

Comments

@remirobichet
Copy link

System info

  • Operating System: Linux
  • Node Version: v20.13.1
  • Nuxt Version: 3.13.0
  • CLI Version: 3.13.1
  • Nitro Version: 2.9.7
  • Package Manager: [email protected]
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

I've clone the repo and reproduce in the playground/nuxt section
https://github.com/remirobichet/motion

Describe the bug

I've tried to add a plugin to add custom directive without using the method described here https://motion.vueuse.org/getting-started/nuxt#installation. I don't want to overcharge my nuxt.config.ts file with this kind of config.

I have 2 console warn :

  • [Vue warn]: Plugin has already been applied to target app.
  • [Vue warn]: Failed to resolve directive: motion-my-directive

It seems i can't reuse the MotionPlugin in a nuxt plugin (cf 1st warn)

Additional context

No response

Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant