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

Usage in nuxtjs3 (plugin attempt) #123

Open
ahoiroman opened this issue Jun 1, 2022 · 1 comment
Open

Usage in nuxtjs3 (plugin attempt) #123

ahoiroman opened this issue Jun 1, 2022 · 1 comment

Comments

@ahoiroman
Copy link

Hello,

I am trying to use this in a early adoption of nuxt3. The vue-wait/nuxt-plugin does not work, so I tried to create my own plugin:

import { createVueWait } from 'vue-wait'

export default defineNuxtPlugin((nuxtApp) => {
    const VueWait = createVueWait({ registerComponent: false,})
    nuxtApp.vueApp.use(VueWait);

    return {
        provide: {
            wait: () => VueWait
        }
    }
})

But unfortunately, this gives me an error:

Unhandled Promise Rejection: TypeError: $wait.is is not a function. (In '$wait.is("test")', '$wait.is' is undefined)

when I try to access it like this:

const {$auth, $wait} = useNuxtApp();

console.log($wait.is('test'))
@galaxyblur
Copy link

@ahoiroman have you had any luck with this?

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

No branches or pull requests

2 participants