I'm building a nuxt site with a gsap custom cursor and gsap page transitions. My problem is that the custom cursor won't work after page has transitioned but without the page transition the cursor works perfectly.
So what I'm trying now is to call the cursor init method after enter() function in nuxt.config.js. I tried to setTimeout for 500ms, it seems to work after 500ms but not sometimes + the user experience gets bad because the cursor lags for a half second and then starts working. My second approach was to toggle a boolean in nuxt store and and then run the init function inside the customCursor.vue component but it seems it is not possible to get access to vuex store from nuxt.config.js file. So now I'm a bit stuck and can't figure out how to init this cursor after the enter() has run (or is that even the problem)
I'll appreciate any help a lot, thank you in advance! (sorry for my english)
Here's the sandbox of the problem: https://codesandbox.io/s/lucid-cookies-yvr2z?file=/nuxt.config.js