Add support for nuxt 3#715
Conversation
|
Hi, thanks for starting this! I do have one question, which I couldn't find a clear answer to in the nuxt docs, is |
|
Good question. In my understanding this seems to be necessary. Have a look at https://nuxt.new/s/module or at what e.g. VueUse is doing: https://github.com/vueuse/vueuse/tree/main/packages/nuxt. They both import directly from import { defineNuxtPlugin } from '#app'Maybe there will be an import like this as well for Also note that VueUse is releasing a custom package for its nuxt integration, maybe because of that reason. I wonder how they make to module compatible with nuxt 2 and nuxt 3 according to https://modules.nuxtjs.org/?q=vueuse. |
|
Hi @rigor789 / @WolfgangDrescher, I'm just wondering if either of you guys are still working on support for Nuxt 3? I really enjoyed using this package in my Vue 2 project and am in the process of migrating it to Nuxt 3 and so am really hoping it will have Nuxt 3 support sometime soon. I see there are quite a few others in the Issues also looking for this. Thanks! |
|
I was not able to improve support for Nuxt 3 for this plugin as I'm not sure how to remove the |
|
As a workaround you could add https://github.com/rigor789/vue-scrollto/blob/7feaccc327a45b54be93783f245b57ee4fed4448/nuxt3/plugin.js as a nuxt plugin. |
Thanks @WolfgangDrescher, that worked like a charm! |
Todos:
meta.compatibilityto nuxt v3.0.0 once it is releasedVueScrollToinstallation.mjsfile extensions)getSSRPropserror once nuxt v3.0.0 is releasedexportsinpackage.json(probably a breaking change)