-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Global registration in Nuxt leads to Vue ReferenceError #25
Comments
Thanks for the issue @Xuffasch Do you mind providing a minimal reproduction repository of the bug? I can try debugging it there. |
Hello @privatenumber Thanks for taking time to look into this issue and please bear with me, I'm not used to exchanges in GitHub, especially regarding open issues. This is the repository of the project where I spotted the bug : https://github.com/Xuffasch/nac-nuxt-vite The master branch currently points to version from which I made the error screenshot. |
@Xuffasch you forgot to import Vue, plugin should looks like:
|
Very sorry guys. You take so much things for granted with Vite that you forget the basics. |
Hello,
I've started a project with Nuxt (2.15.3) and tried vue-frag in my components, after using vue-fragment which does not work with server-side rendering.
The directive works as expected when I import it locally for each component.
But when I tried to globally register it as a plugin, a Vue ReferenceError is triggered.
The browser console only says it encounters an error fetching the favicon
On the server side, no error message is logged.
My Nuxt settings are :
in a new file ./plugins/vue-frag.js
in nuxt.config.js, I have added the plugins property to the default export :
The text was updated successfully, but these errors were encountered: