-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Module improvements #3
Comments
Hi, thanks for the review. I'll get to work on it, immediately. Please, to clarify, how do you mean mock? Mock (as in fake) the umami function on the server? Thank you. |
An empty function should do the trick. It is to avoid breaking SSR code if someone calls |
Thank you. Nearly there... Created the mock, and renamed the plugin to Here's the addPlugin function: Line 66 in 012b8cb
|
Hi @pi0 So, what I did was:
That way umami is mocked if used by mistake, and a warning is logged. Please let me know what you think, and what other improvements I can make. https://github.com/ijkml/nuxt-umami/tree/client-only-patch |
Hi dear @ijkml. I have checked client-only patch! It is in fact a much nicer solution to use one plugin with ssr fallback. Only as a tip, instead of using |
Hi! Following up nuxt/modules#427 i've made a quick review:
plugin.client
and also add aplugin.server
that mocks$umami
to avoid breaking users on SSRRest seems a nice module 🚀
The text was updated successfully, but these errors were encountered: