-
-
Notifications
You must be signed in to change notification settings - Fork 27
Return gtmPlugin from app context #409
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
Conversation
Here's the bug in nuxt-gtm that this would solve (at least in my use-case): zadigetvoltaire/nuxt-gtm#14 |
Looks like |
Is it possible to add a test for this? So we can prevent regression? |
I'll see if I can come up with a way to test it. What triggered it in our case was two levels of indirection (it was initialized through |
Maybe spy or mocks can help to simplify it |
I have a problem with Vite inline, which in production mode just copies the
useGtm
function wholesale to the calling file, without copying the scope. This fix solves that problem, since it always fetches the gtm instance from the vue app context