Replies: 4 comments 4 replies
-
I had a simliar need. Essentially I’d like to access the router from Vuex and Xstate. Usually you’d import the router instance but I’m not sure how to do that (or if you should) when using Vite-ssg. Is there a way to 'Access to the vue-router from the outside'? |
Beta Was this translation helpful? Give feedback.
-
I have the same problem :( Somebody figured out this? |
Beta Was this translation helpful? Give feedback.
-
any one figure out how to import router from outside. |
Beta Was this translation helpful? Give feedback.
-
maybe it's not the best way ,but this what i did :
|
Beta Was this translation helpful? Give feedback.
-
Hi all,
Is there a reason that only
RouterOptions
can be added to the ViteSSG setup function? In my projects I create the "router" before so that I can use it also outside of VueJS components (like axios interceptors).When I looked at the code, it seemed that this behaviour was intentional or maybe I don't understand SSG's approach correctly?!
Thanks
Beta Was this translation helpful? Give feedback.
All reactions